Just today I discovered the trace point feature in Visual Studio. Wow – this is cool.
Trace points allow you to emit information to the output window or even start a macro when a certain line of code was hit during debugging.
To enable a trace point, insert a normal break point and then right click->When Hit.
The following expression outputs the function name, thread id and name and the current security context. Very handy!
Function: $FUNCTION, Thread: $TID $TNAME
Security Context: {WindowsIdentity.GetCurrent().Name}
I am currently experimenting what other cool things I can do using the macro support…We’ll see…