## Debugging a Program

Use the Debug command () to execute a program under debugger control using the current launch configuration settings.

If this is the first time the program is launched for debugging, a new debug launch configuration is automatically created for you based on current project settings and assigned a name. If a debug launch configuration is already available, the Debug command launches using the last debug launch configuration used with the project.

#### Launching a Program for Debugging

- Click the Debug button () in the C/C++ perspective

or

- Select Run > Debug from the menu bar

Both of these methods create a new debug launch configuration if none previously existed in the project or uses the last one launched for debugging.

- To launch using a specific debug launch configuration, right-click the project's EXE file in the Project Explorer view and select Debug As > Project_Name from the Project Explorer context menu

The debugger assumes control of the program execution as the program runs.

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