Debugging without executing your application
- Posted: Jul 30, 2009 at 11:06 AM
- 362 Views
- 4 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
I came across Habib Heydarian's blog and he has one of the coolest tips I've seen in a while with debugging. Habib shows how to debug an application without actually running it.
He uses the Immediate Window (Debug –> Windows –> Immediate Window) to actually create an instance of the Window then uses the Show Dialog method to display it. Since this code is executing, it will trigger break points in your code!
Via [10-4 episode on the Historical Debugger in Visual Studio 2010]
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Great...!!! I'll try it right now.
Really? 1) it takes longer to type the friggin' commands out then to hit F5 and click a button. 2) How many sub form don't depend on some data being passed from a parent form. 3)He states there is NO WAY to set your startup form? Huh? The app just picks one at random? I think NOT!
@Steve Bargelt, if you have an application that has tons of forms, it can become very time consuming to click through everything to get to the item you want. And then you can test, close, tweak, hit up in the intermediate window which will repeat the last command, hit enter and bam, it repeats. If a form needs data sent, you may be able to mock it out. This may not work in every scenario but it is one tool to help out.
He is wrong regarding no way to declare what form is the start up form. That can be configured in App.Xaml by changing the StartupUri attribute in the root.
Good catch.
One thing to know is that for C# projects Visual Studio actually starts a debugging session for you behind the scene.
Remove this comment
Remove this thread
close