You can display the value GetLastError() will return by putting "@err" in your watch window.
You can see the error message associated with that value by putting "@err,hr" in your watch window.
If you've placed an HRESULT in a variable, adding ",hr" to the variable name in the watch window will display the associated text.
The Watch windows or the QuickWatch dialog support some special (debugger-recognized) variables called pseudovariables.
The documented one include:
- $tid – the thread ID of the current thread
- $pid – the process ID
- $cmdline – the command line string that launched the program
- $user – information for the account running the program
- $registername – displays the content of the register registername