Setting break points
Once a break point is hit the usual stepping functionality is available – step through and step into so you can watch the execution flow closely.
The break points that you set will be persistent and exist when you re-open a project where you previously set break points.
Updating values on the fly
Often when debugging you will want to change a value, just to test how the system handles it. Rather than needing to stop, change and restart you can now update a value on the fly while debugging to test new values. In this case we can update our resize time to 25 seconds.
By clicking the value and typing in the new one we can instantly see this reflected. It couldn’t be easier.
Querying with the intermediate window
The intermediate window is a hidden gem in Visual Studio – it’s been there as long as I can recall but I don’t often see other developers making use of this powerful tool.
While debugging, jump into the intermediate window by clicking on the pane at the bottom of Visual Studio. If you don’t see the intermediate window you can bring it into view by pressing CTRL + ALT + I.
Within the intermediate window you can write queries and code that should be executed within the scope of the currently hit break point. This is great when needing to inspect values that are hard to navigate to, type cast and carry out other tasks.
A word for those who want to start debugging with Visual Studio 2008 right away – make sure that you enable script debugging in Internet Explorer. Without enabling it you will get an error about no symbols being loaded and the the break point will never be hit.
Download Visual Studio 2008 90 day trial
For detailed information and to request a free 90-day trial DVD of Visual Studio 2008 Team Suite to be sent out to you, go to the Microsoft Visual Studio webpage.
About the Author
John-Daniel Trask is a co-founder of Mindscape, a product development company based in Wellington New Zealand. He also maintains a popular blog about software development and business.
Other related posts:
The Visual Studio 2008 blog is back
Windows Workflow Enhancements in Visual Studio 2008
A completely non-comprehensive introduction to Visual Studio 2008
Comment by Dave, on 4-Apr-2008 09:39
I've been debugging for a while with Visual Studio 2005 and one thing strikes me as odd. I have 2008 at home (XP) and at work (Vista) and at work I no longer see the "Scripts" window with all the loaded scripts. I can't seem to turn it back on. Also, the menu structure seems different from XP to Vista. Can you shed any light on this?
Comment by lynette, on 20-Nov-2009 10:33
i have enable in IE the ability to debug scripts. if i go to my section in my code and attempt to place a breakpoint i receive the message that this is an invalid location for a breakpoint. Am i missing something here? Thanks - Lynette Temple