CLion 2016.2 Help

Configuring Breakpoints

On this page:

Basics

For a breakpoint, you can configure the following properties:

  • Actions to be performed upon hitting a certain breakpoint.
  • Suspend policy, which defines whether the application should be suspended upon hitting the breakpoint.
  • Dependencies on other breakpoints.
  • Conditions defining when a breakpoint is hit.

CLion suggests the following way to change the breakpoints properties:

  • Using the Breakpoints dialog box, for a breakpoint selected in the list.
  • Using breakpoint icon in the left gutter

Configuring breakpoints

To configure actions, suspend policy and dependencies of a breakpoint

  1. Do one of the following:
    • Right-click a breakpoint in the left gutter, and then click the link More or press Ctrl+Shift+F8.
    • Open the Breakpoints dialog box as described on page Accessing Breakpoint Properties and select the desired breakpoint in the list.
    • In the Favorites tool window, select the desired breakpoint, and click edit1.

    Note that the pop-up window shows less options than the Breakpoints dialog box. To show hidden options, click More.

  2. Define the actions to be performed by CLion on hitting breakpoint:
    • To notify about the reaching of a breakpoint with a text message in the debugging console, select the Log message to console check check box.

      To evaluate an expression in the context of a breakpoint and display its value in the debugging console, check the option Evaluate and log, and enter a valid expression in the option field.

      This feature lets you obtain information about your running application without having to suspend its execution.

    • To set a breakpoint the current one depends on, select it from the Disabled until selected breakpoint hit drop-down list. Once dependency has been set, the current breakpoint is disabled until selected one is hit.
      • Choose Disable again radio button to disable the current breakpoint after selected breakpoint was hit.
      • Choose Leave enable radio button to keep the current breakpoint enabled after selected breakpoint was hit.
    • Enable suspending an application upon reaching a breakpoint by selecting the Suspend check box, and then select one of the option buttons to specify the way a running program will be paused. For more information on the Suspend options, refer to Breakpoints dialog reference.
    • To set the break condition, enable condition by selecting the appropriate check box, and enter the desired expression in the Condition field.

      If the expression evaluates to true, the user-selected actions are performed. If the evaluation result is false, the breakpoint does not produce any effect.

Configuring exception breakpoints

To configure actions, suspend policy and dependencies of an exception breakpoint

  1. Open the Breakpoints dialog box as described on page Accessing Breakpoint Properties and select the desired breakpoint in the list.
  2. Define the actions to be performed by CLion on hitting breakpoint:
    • To associate a breakpoint with a throw expression, select the When thrown and then When any is thrown enabled check boxes.
    • To associate the breakpoint with a try-catch block, select the When caught and then When any is caught enabled check boxes.
    • Enable suspending an application upon reaching a breakpoint by selecting the Suspend check box, and then select one of the option buttons to specify the way a running program will be paused. For more information on the Suspend options, refer to Breakpoints dialog reference
    • To notify about the reaching of a breakpoint with a text message in the debugging console, select the Log message to console check box.
    • To remove breakpoint when it is reached by the program, select the Remove once hit check box.
    • To set a breakpoint the current one depends on, select it from the Disabled until selected breakpoint hit drop-down list. Once dependency has been set, the current breakpoint is disabled until selected one is hit.
      • Choose Disable again radio button to disable the current breakpoint after selected breakpoint was hit.
      • Choose Leave enable radio button to keep the current breakpoint enabled after selected breakpoint was hit.
    • Enable suspending an application upon reaching a breakpoint by selecting the Suspend check box, and then select one of the option buttons to specify the way a running program will be paused. For more information on the Suspend options, see the Breakpoints dialog reference.
    cl_configuringExceptionBreakpoint

Configuring symbolic breakpoints

To configure actions, suspend policy and dependencies of a symbolic breakpoint

  1. Open the Breakpoints dialog box as described on page Accessing Breakpoint Properties and select the desired breakpoint in the list.
  2. Define the actions to be performed by CLion on hitting breakpoint:
    • To enable a particular breakpoint, select the [Symbol name] enabled check box
    • Specify the symbol name in the Symbol name field. When you start entering the symbol name, IDE presents the list of similar symbols at your choice. You can choose the symbol from the list or continue with entering the desired name. You can let IDE to finish the name using autocomplete feature.
    • Specify the module where breakpoint is applicable in the Module name field.
    • To set the break condition, enable condition by selecting the appropriate check box, and enter the desired expression in the Condition field.

      If the expression evaluates to true, the user-selected actions are performed. If the evaluation result is false, the breakpoint does not produce any effect.

    • To notify about the reaching of a breakpoint with a text message in the debugging console, select the Log message to console check box.

      To evaluate an expression in the context of a breakpoint and display its value in the debugging console, check the option Log evaluated expression, and enter a valid expression in the option field.

      This feature lets you obtain information about your running application without having to suspend its execution.

    • To set a breakpoint the current one depends on, select it from the Disabled until selected breakpoint hit drop-down list. Once dependency has been set, the current breakpoint is disabled until selected one is hit.
      • Choose Disable again radio button to disable the current breakpoint after selected breakpoint was hit.
      • Choose Leave enable radio button to keep the current breakpoint enabled after selected breakpoint was hit.
    cl_configuringSymbolicBreakpoint

See Also

Last modified: 22 November 2016