VON#
Confessions of a code junkie
RSS
Friday, February 29, 2008
Most Everything the Immediate Window Can Do the Watch Window Can Do Better
I saw a
post
on
oh null!
that talks about how you can evaluate expressions within the immediate window, whether you're simply retrieving a variable or performing a calculation on multiple variables. I personally like to do all of this in the Watch Window because I can have an easy history of what variables I've interrogated. Like the immediate window, you can call Methods and display the results, but since methods can change state, they will not execute automatically after you step into a new line of code, but there is a nice little refresh button that will re-execute your method call.
As I understand it, the watch window is a wrapper around the simpler functionality of the immediate window, so it also supports Intellisense. But there are some things that you can only do in the immediate window, like the .load [dll] command which lets you import another assembly for your use, which is pretty damn slick. I've only ever really used that feature in one scenario: to load the Son of Strike assembly which helps you get detailed information on your executable (very detailed call stack info, very granular heap information, but kind of hard to use).
Another cool thing you can do in your immediate window: Declare new variables. Those variables will have the same scope as the current breakpoint in execution, but the ability opens the doors to some neat possibilities. For instance, you could declare a new variable, copy a subset of information from your current in scope variables and then use my
Xml Utility Methods
to copy your new object out to disk! I'm not quite sure why you would need to do that, but its nice to be able to!
Friday, February 29, 2008 - 8:53 AM CST -
Permalink
Comments [0]
-
Tags:
Tips and Tricks
Comments are closed.
All Content © 2009, Jon von Gillern
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
Home
Tags
Blend
Design
IADNUG
Projects
Stuff
Tips and Tricks
Wishlist
Archive
October, 2008 (1)
September, 2008 (1)
August, 2008 (1)
July, 2008 (2)
June, 2008 (2)
May, 2008 (2)
March, 2008 (2)
February, 2008 (8)
January, 2008 (4)
December, 2007 (6)
November, 2007 (2)
Blogroll
Eric Sink
Javier Lozano
Jeff Atwood
Joel Spolsky
Nick Parker
Paul Graham
Scott Hanselman
Tim Gifford