Show TOC

Adding Conditions to BreakpointsLocate this document in the navigation structure

Context

You have the option to specify a condition for an ABAP breakpoint. The condition is evaluated at runtime whenever the source code position of the related breakpoint is reached. If the condition is fulfilled (evaluates to true), the debugger will stop execution at the breakpoint. Otherwise, if the condition is not fulfilled, the debugger will not stop at the breakpoint.
Note An empty condition always evaluates to true.

Procedure

To add a condition to an existing ABAP breakpoint, proceed as follows:

  1. Position the cursor in the ruler (left bar) of the source editor at the breakpoint position.
  2. Open the context menu and choose Breakpoint Properties…
    Using properties dialog to add condition to a breakpoint
    Figure 1: Using properties dialog to add condition to a breakpoint
    Tip

    Alternatively, you can specify a breakpoint condition in the Breakpoints view of the Debug perspective.

  3. In the screen that appears, edit a condition in the corresponding entry field:

    More on this: Syntax for Breakpoint Conditions

    Note The maximum length of a breakpoint condition is 255 characters.
    Editing breakpoint condition
    Figure 2: Editing breakpoint condition
  4. Choose Apply to save the new breakpoint’s property.
    Note The validation of the condition syntax takes place at design time. The actual existence and validity of the operands (for example, variable symbols) however is checked at runtime as they cannot be checked properly at the time when they are created. If an operand is not valid, the program stops when it reaches the breakpoint and a corresponding error message occurs.

Results

You have added a condition that is now active for the specified breakpoint. This is indicated by the new breakpoint decorator that is visible in the ruler of the source editor.
The symbol C is added to the breakpoint’s decorator in the editor ruler
Figure 3: The symbol C is added to the breakpoint’s decorator in the editor ruler