Terminating a debug session
There are a number of ways to end a debug session. Various methods are described below.
Terminate
Terminating results in an immediate end to a debug session.
To terminate a debug session:
In the Debug view, select the debug target that you want to terminate. Do one of the following:
- Select Terminate from the workbench Debug menu.
- Right-click and select Terminate from the pop-up menu. Alternatively, you can select Terminate and Remove to terminate the session and remove it from the Debug view.
When you are launching a debug session for an HTML script application, the workbench launches a browser to run the application or it attaches to an existing browser (depending on your choice in the launch configuration). When you terminate the debug session, you can have this browser terminated or you can have it left running. By default, you are prompted via a dialog to choose to terminate the browser or to leave it running. If you wish to have the browser terminated by default or leave it running by default, you can set debug preferences accordingly. For information about this, see the related topic below.
To terminate all debug sessions, right-click in the Debug view and choose Terminate All from the pop-up menu.
If you have terminated one or more sessions and would like to remove them from the Debug view, right-click in the Debug view and choose Remove All Terminated from the pop-up menu.
Disconnect
If you are running the debugger client on Windows and debugging an application, disconnecting results in termination of the debug session and of the application.
To disconnect from a debug session:
- In the Debug view, select the debug target that you want to disconnect from.
- Click the toolbar Disconnect push button or right-click the debug target and select Disconnect from the pop-up menu.
When you are launching a debug session for an HTML script application, the workbench launches a browser to run the application or it attaches to an existing browser (depending on your choice in the launch configuration). When you disconnect the debug session, manually terminate the browser. If you choose to leave the browser running, the Microsoft Script Debugger may open.
Resume (Run)
If you are debugging an application that runs to termination, and which contains no active breakpoints, choosing to Resume a suspended thread will result in an end of the debug session (ie. the program will run to completion and the debug session will terminate).
Related tasks
Setting debug preferences
Preparing to debug
Starting a debug session
Debugging Web project script
Using the Debug view
Debugging an HTML Script Application
Debugging a Script Host Application
Running an Active Script application
Stepping through a program
Halting a running program