How to set a breakpoint condition for a specific instance of an object in IntelliJ?

Suppose in the debugger I saw that the value thisfor some instance

{MyClass@6164}

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

+4
source share
1 answer

You can use a conditional breakpoint .

Set a condition in which you check this.hashCode() == HASHCODE. You can get it HASHCODEusing the Evaluate Expression function .

Hope this helps.

Conditional BreakPoint

+5
source

All Articles