## Terminate Program Execution

Use the Terminate command () to stop or halt a program based on the type of debugging session underway. Terminate behavior includes:

- Emulator - terminates program execution and ends the debug session
- Application TRK or System TRK - kills the process on the device and ends the debug session. To terminate without killing the process, use Disconnect instead.
- Stop-mode soft attach - suspends the attached process while other processes continue to run on the device. If only a single process is running on the device, the device CPU is suspended. Once the CPU is suspended you must launch a new debug session to resume the device CPU.

This behavior differs from suspending a program, as this temporarily suspends execution.

NOTE If the Debug view loses focus, the Terminate control will appear disabled. To regain focus, select a thread in the Debug view to update the tool bar and reactivate the Terminate control.

#### Terminating Program Execution

- Click the Terminate button () in the Debug view

> or

- Right-click and select Terminate from the Debug context menu

or

- Select Run > Terminate from the menu bar

The debugger kills program execution and ends the debugging session.

NOTE If using an emulator, exiting it will also end the debugging session.

For more information on debugging, see C/C++ Development User Guide > Tasks > Running and debugging projects > Debugging.

##### Related references

- Working with the Debugger
- Debug View