Reputation:
I would like to add two breakpoints on the same line in IntelliJ: one always logs a message, and the other suspends the program if a certain condition is true.
Is this somehow possible to do in IntelliJ?
Upvotes: 1
Views: 754
Reputation: 2664
There's no way to have two breakpoints on the same line currently.
A workaround - log and check inside breakpoint condition:
here we log depth
on every hit, but stop only if depth % 10 == 0
Upvotes: 2
Reputation: 5850
Yes, it's possible.
Right click on breakpoint and then click More, or by shortcut: Ctrl + Shift + F8 which opens Breakpoints dialog where you need to set up following options:
Upvotes: -1