Walkthrough: Debug a WPF window or Windows Form without running your application [Video]

Most Windows GUI applications share a common trait. They all have multiple forms and/or dialogs. In the screenshot below, this simple application alone has four WPF windows.

Solution Explorer showing 4 WPF windows

If I want to debug the main window, that's easy. I just press F5 and the main window or form starts up. However, if I want to debug one of windows or dialogs that are displayed as a result of clicking a button in my application, it requires me to i) start my main application and ii) click through various windows and dialogs until I get to the window that I'm interested in.

This is both tedious and can be time consuming. There is a much easier way to debug a window or form, without having to start the debugger and clicking through the application.

Watch the video below for a walkthrough.


Get Microsoft Silverlight


This feature is available for both C# and VB. Feel free to drop me a line if you are using this feature today.

Habib Heydarian.