calling functions from inside the watch window
It sometimes becomes handy to be able to call functions or methods while debugging. Say you have some complex type that you want to visualize on the console or to your debug output.
The VisualStudio expression engine makes this an easy task (no need to brush up your assembler knowledge on this one) just enter the function signature into your watch window. Note that you will need to fully qualify any namespaces.
If your project consists of multiple modules, or when you use the same function signature in different compilation units you will have to tell the debugger where to find the symbol.
For this the context operator {[function],[source],[module] } location is defined.
You should have a look at the reference[1] over at MSDN to familiarize yourself with the syntax.
[1] – The context operator – http://msdn.microsoft.com/en-us/library/wztycb7f%28VS.80%29.aspx
About this entry
You’re currently reading “ calling functions from inside the watch window ,” an entry on coders
- Author:
- fschaper
- Published:
- 8.28.09 / 2am
- Category:
- productivity improvement, programming, visual studio
- Feedback:


No comments
Jump to comment form | comments rss [?] | trackback uri [?]