Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set breakpoint condition to specific object instance in IntelliJ?

Suppose I saw in debugger that this value for some instance is

{MyClass@6164}

Now, how to set a breakpoint in some method and set its condition so that is stops only if this is the same?

like image 840
Dims Avatar asked Jul 14 '16 11:07

Dims


1 Answers

You can use a conditional breakpoint.

Put a condition where you evalute this.hashCode() == HASHCODE. You can get the HASHCODE using the Evaluate Expression feature.

Hope that helps.

Conditional BreakPoint

like image 83
Peter Avatar answered Oct 02 '22 14:10

Peter