Microsoft Re-invents Printf Debugging
If you’re like me, you can’t get enough of good old printf debuggery. Thankfully, those friendly folks at Microsoft kept even bad engineers like us in mind when dreaming up features for VS.2005; they’ve added a variation on breakpoints called “TracePoints”. These don’t actually break when you reach them, instead they allow you to output logging info to the console or run macros. You can set these tracepoints to continue or to break, which makes me wonder if I’ll ever use breakpoints at all anymore. I haven’t delved into the macros at all, so if anybody has more info on that, please feel free to chime in.
The syntax for your console statement is to output variable values thus:
The value of foo is {foo}
There are also keywords to output useful trace stuff like $CALLSTACK, $PID, $TID, etc. But there’s a much more alarming thing that you can do in there:
The value of foo is {foo=-1}
Woohoo! Obviously, that little trick should be used sparingly.
In all seriousness, this is very useful stuff if you've ever tried debugging anything involving, say, paint or refresh events because whenever you break into the debugger you're mucking with your event stream; not to mention those "heisen-bugs" that either disappear under breakpoints or only appear when you add logging or instrumenting code. With tracepoints you can gather debug info without breaking the flow of the app, or even modify the flow via that {foo=5} stuff without actually touching the code.
equity 125 loan home ratepersonal 5000 loanloan hour 12000 personal loandollar 10,000 loans100k school loansloan amortizeloans 100 home financing Map


