Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to register breakpoint on watch expression change event in Intellij Idea?

Is it possible to do that ? I can't figure that out via Expression Evaluation or Watch expression.

For instance I have this expression being watched name.equals("whatever") and the method is called many times, name is its argument... And I'd like to stop the execution when it turns TRUE.

like image 795
lisak Avatar asked Mar 13 '12 08:03

lisak


People also ask

How do I mark a breakpoint in Intellij?

To do this, go to Settings/Preferences | Build, Execution, Deployment | Debugger and select Drag to the editor or click with middle mouse button. Clicking a breakpoint will then enable or disable it.

How do I continue after breakpoint in Intellij?

After starting application your program execution suspends when the first breakpoint is hit. Such a breakpoint is marked with a blue stripe. You can press F8 to step to the next statement and f9 to step to the next breakpoint.

How can I change variable value while debugging in Intellij?

Select a variable or a property of a complex object in the Debug window, press F2 or right-click and choose Set Value... from the context menu, and then specify a new value and press Enter .

What does a tick on a breakpoint mean in Intellij?

Their documentation Describes the checkmark as "Shown at run-time when the breakpoint is recognized by the debugger as set on an executable code line." and the regular red dot as "Shown at design-time or during the debugging session when the class with such breakpoint is not yet loaded. "


1 Answers

Place a break point as usual, then right-click on it -> Properties. In the opened dialog there is a "Condition" edit box, here you could put your expression.

like image 152
kan Avatar answered Oct 03 '22 08:10

kan