TracePoints and Security Information

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…


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s