Documentation

Documentation

    ›Breakpoints

    General

    • Getting Started
    • Use Cases

    SDK Setup

    • Introduction
    • JVM
    • .NET
    • Python
    • Ruby
    • Node.js
    • Deployment Examples

    Debug Session

    • Debug session setup
    • Source Repositories
    • Labels

    Breakpoints

    • Breakpoints
    • Breakpoint Status
    • Conditional breakpoints
    • Breakpoint Tasks

    Organizations

    • Organizations

    Advanced

    • Integrations
    • Collaborations
    • Controller Setup
    • Scripting Reference
    • OpenTracing
    • Keyboard Shortcuts

    More

    • Software Versions
    • Controller License
    Edit

    Conditional breakpoints

    A large amount of messages in a Debug Session can be confusing at times, especially when trying to solve a specific bug or find a certain use case. For a faster debugging experience - refine data and filter out irrelevant messages by setting a Conditional Breakpoint.

    Conditional breakpoints allows you to limit your data collection from a code snippet to only when the defined expression evaluates as true. This makes it possible to debug specific scenarios, and limit your messages to

    Add a Condition by right click on a breakpoint and choose the 'Edit' option. A right pane will open up, click on the arrow next to 'Condition', write the expression you wish to check and click 'Set' at the bottom of the pane.

    Rookout provides two types of conditions:

    • Simple - compare the value of one or two variables.
    • Advanced - define a complex condition using logical parameters (use "&&" for AND statement, "||" for OR statement, "(" and ")" for encapsulation).

    Advanced conditions - supported operators and functions:

    OperatorExample                                                   Description
    ==a==1, b=='bbb', x==yIf the values of two operands are equal, then the condition becomes true.
    !=a!=1, b!='bbb', x!=yIf values of two operands are not equal, then condition becomes true.
    >a>1, x>yIf the value of left operand is greater than the value of right operand, then condition becomes true.
    >=a>=1, x>=yIf the value of left operand is greater than or equal to the value of right operand, then condition becomes true.
    <a<1, x<yIf the value of left operand is less than the value of right operand, then condition becomes true.
    <=a<=1, x<=yIf the value of left operand is less than or equal to the value of right operand, then condition becomes true.
    in'bbb' in aIf the value of the left operand is included in the right operand, then the condition becomes true.
    &&a<=1 && b!='bbb'If both the operands are true then condition becomes true.
    ||a<=1||b=='bbb'If any of the two operands are non-zero then condition becomes true.
    ()(a<=1||b=='bbb') && (x<y)Parentheses could be used for changing the precedence when evaluating the conditio
    []arr[4]!=4, dict['a']!=4Set conditions regarding to a specific sequence’s element - list, dict etc.
    sizearr.size() >= 32Use size instead of len or length on any platform
    • Evaluating functions are currently not supported in conditions.

    Time-To-Live:

    Seting time-to-live on a breakpoint places limits on the life span of the breakpoint. The breakpoint will disable automatically past the configured limit

    Keep in mind:

    1. The supported syntax may be different from your developing language and it can be confusing - just make sure you use the supported operators above.
    2. A condition can be invalid due to typos and wrong variables, check that your variables written correctly.
    ← Breakpoint StatusBreakpoint Tasks →
    Documentation
    General

    WelcomeUse Cases
    SDK Setup

    Setup IntroJvm SetupDotnet SetupPython SetupRuby SetupNode SetupDeployment Examples
    Debug Session

    Debug Session SetupSource ReposProjects Labels
    Breakpoints

    BreakpointsBreakpoints StatusBreakpoints ConditionalBreakpoints Tasks
    Organizations

    Organizations
    Advanced

    IntegrationsCollaborationsController SetupBreakpoints ReferenceOpen TracingKeyboard Shortcuts
    More

    Sdk DigestsLicense
    Other

    Status
    GitHub - RookoutFacebook - RookoutTwitter - RookoutLinkedIn - Rookout