CLion Help

Adding Line Breakpoints

In this section:

Basics

A line breakpoint set_breakpoint is a breakpoint assigned to a specific line in the source code.

Line breakpoints can be set on executable lines. Comments, declarations and empty lines are not valid locations for the line breakpoints.

Creating line breakpoints in the editor

  1. Place the caret on the desired line of the source code.
  2. Do one of the following:
    • Click the left gutter area at a line where you want to toggle a breakpoint.
    • On the main menu, choose Run | Toggle Line Breakpoint.
    • PressCtrl+F8.

Note that for lambda expressions, you can set multiple breakpoints within a single line. To do this, click the left gutter area at a line where you want to set a breakpoint. A drop-down list will appear where you can select which method(s) you want to set a breakpoint at:

lambda_breakpoints

Creating temporary line breakpoints

  1. Place the caret on the desired line of the source code.
  2. Do one of the following:
    • On the main menu, chooseRun | Toggle Temporary Line Breakpoint.
    • PressCtrl+Shift+Alt+F8.

Deleting line breakpoints

Do one of he following:

  • In the Breakpoints dialog box, select the desired line breakpoint, and click delete.
  • In the editor, locate the line with the line breakpoint to be deleted, and click its icon in the left gutter.
  • Place caret on the desired line and press Ctrl+F8.

See Also

Last modified: 20 October 2015