0.2.8 How to Start and Stop Applications in Visual Studio

Debugging (and running) an application is controlled by either using the GUI controls in Visual Studio or keyboard shortcuts. Debugging in this course will follow a similar pattern of setting breakpoints, starting the application and stepping through the code. There are, however, a few nuances that we will go over.

Starting the application

You can start the application by either pressing Start in the toolbar or pressing F5. This will bring up the WPF window/application.

Stopping the application

When the application is running you can stop the application by either pressing the Stop button in the toolbar or pressing SHFT+F5. If you click the X on the WPF application that will also stop the application.

Restarting the application

An alternative to starting and stopping the application is to restart it. This can be done by either clicking the Restart button in the toolbar or pressing CNTL+SHFT+F5. Restarting will act just like a full stop and start and will bring up the WPF application.

Continue

When setting breakpoints and stepping through the code, the debugger will give you the option to Continue. When clicking Continue, the debugger will step through the code until it hits either the next breakpoint or the end of the code of whatever event handler you are in. This is a helpful tool when you are setting multiple breakpoints throughout the code and/or testing different button functionality.