Compartilhar via


How to: Set a Simple Breakpoint 

The Visual Studio debugger provides many ways of setting breakpoints. This topic gives two quick ways of setting simple breakpoints.

For other ways of setting breakpoints, see:

How to: Set an Address Breakpoint

How to: Set a Function Breakpoint

How to: Set a Breakpoint on a Function Call from the Call Stack Window

For ways of setting advanced features on a breakpoint, see:

How to: Specify a Hit Count

How to: Specify a Breakpoint Condition

How to: Specify a Breakpoint Filter

How to: Specify a Tracepoint/Breakpoint Action

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To set a simple breakpoint (from the shortcut menu)

  1. In a source window, click on a line of executable code where you want to set a breakpoint.

  2. In the shortcut menu, go to Breakpoint and choose Insert Breakpoint.

To set a simple breakpoint (from the Debug menu)

  1. In a source window, click on a line of executable code where you want to set a breakpoint.

  2. From the Debug menu, choose Toggle Breakpoint.

See Also

Concepts

Breakpoints and Tracepoints