Today I wanted to talk about my strangest contribution to the Whidbey debugger is a new pseudo-register — $user.
What is $user?
First, I guess I should define what a pseudo-register is. Pseudo-registers are fake variables that can be evaluated in any of the watch windows. The native debugger has had these forever. For instance, ‘@err,hr’ will give you the last win32 error (formatted as an error message).
$user will give you loads of information about the debuggee user. Here is a screen capture for a process running as my domain account:
You can expand ‘Groups’ or ‘Privileges’ to get a full list of all the groups or privileges that the token has.
Where can you get it?
Whidbey Beta 1 has this feature, so you can have it today if you don’t mind Beta software. Otherwise, it should appear in the final release of Visual Studio 2005, which should be available sometime in 2005.