Starting a C or C++ Debugging Session
See Also
When you start a debugging session, the IDE starts the
debugger in the project's associated tool collection, then runs the project inside the debugger. The IDE automatically
opens the debugger windows and prints debugger output to the Output window.
To debug the main project:
- Choose Debug > Debug Main Project or click the Debug Main Project toolbar
button
. The program runs until it
reaches a breakpoint or exception or
until it terminates normally
.
To debug a project other than the main project, do one of the following:
- Right-click the project in the Projects window and choose Debug. The IDE
runs the project in the debugger until execution stops or a breakpoint is reached.
- Right-click the project in the Projects window and choose Step Into. The IDE
runs the project in the debugger to the first line after the main routine and
pauses execution before any changes have been made to the state of the program.
To restart an existing debugging session:
- When your program is stopped at a breakpoint or paused, click the Restart toolbar
button
. Restarting a debugging session throws out any cached state.
Legal Notices