How to: Stop Debugging or Stop Execution

This topic applies to:

Edition

Visual Basic

C#

F#

C++

Web Developer

Express

Topic appliesTopic appliesTopic appliesTopic appliesTopic applies

Pro, Premium, and Ultimate

Topic appliesTopic appliesTopic applies

Topic applies

Topic applies

Stopping debugging means terminating the debugging session. Stopping execution means terminating the process you are debugging and ending the debugging session. It should not be confused with breaking execution, which temporarily halts execution of the process you are debugging but leaves the debugging session active. For more information, see Breaking Execution.

To stop debugging

  • On the Debug menu, choose Stop Debugging.

Stop Debugging terminates the process you are debugging if the program was launched from Visual Studio. If you attached to the process, instead of launching it from Visual Studio, the process continues running. If you want to terminate attached processes, you can terminate a single process from the Processes window or terminate all attached process with the Terminate All command.

To terminate all attached processes debugging

  • On the Debug menu, choose Terminate All.

If you want to stop the run you are currently debugging and immediately begin a new run, you can use the Restart command.

To stop debugging and restart

  • On the Debug menu, choose Restart.

Restart stops the current debugging session and restarts the startup project.

Debugging will stop automatically if you exit the application you are debugging. If you are debugging multiple programs, debugging will continue until you exit the last program. If you are debugging a project hosted by another application, such as a Web project hosted by Microsoft Internet Explorer, debugging stops if you exit the host application such as Microsoft Internet Explorer.

In Visual Basic and C#, if you are debugging a Web service and the client application that uses that service is terminated, debugging of the Web service stops.

Community Additions

ADD
Show: