Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Winning the award for the least understandable UI metaphor: the ability to view the environment variables in the target when native debugging. This is yet another tiny undocumented feature of the native expression evaluator in VS. $env falls under the same extravagant disclaimer from the @clk post.
Place $env in the watch window and you get … the size in bytes of your environment block.
Wow.
Far more useful is to type "$env=0", which evaluates to "0", and dumps all the Environment Variables to the output window. If you use the Immediate window "?$env=0" you get everything inline. The feature requires you to be native (or interop) debugging and to evaluate it from a native frame.
Despite the insane UI interaction, the end result is very useful information.
Comments
- Anonymous
March 21, 2006
How come it doesn't work when I do it in VS2005?
It says: The name '$env' does not exist in the current context.
Thanks!
Noli - Anonymous
June 16, 2009
PingBack from http://thetweaker.wordpress.com/2009/06/17/viewing-debugee-environment-ariablesv/