IntelliJ Idea (debugging) conditional breakpoint dependent on other breakpoints

20,920

You can do that in the View Breakpoints... view:

enter image description here

In your case you will first have to set a conditional breakpoint on B1 so that when it is hit then and only then B2 will be triggered.

enter image description here

Share:
20,920
klingt.net
Author by

klingt.net

https://github.com/KLINGTdotNET

Updated on July 09, 2022

Comments

  • klingt.net
    klingt.net almost 2 years

    I want to set a debug breakpoint in IntelliJ Idea that is only active, if another previous breakpoint was activated. For example i have a breakpoint B1 on line 10, and another breakpoint B2 on line 20. Even if B2s condition is true, the debugger should only halt if B1s condition was true before B2s.

    Is something like this possible in Idea?

    Update:

    Currently i'm working with this workaround:

    1. set the two breakpoints
    2. disable breakpoint #2
    3. start the debugger, wait until breakpoint #1 is active
    4. activate breakpoint #2

    I hope there is a cleaner way to do this :)