Trick for setting conditional breakpoints inside the Java standard libraries:
Here’s something non-obvious I’ve learned in my years as a Java developer. If you set a breakpoint in one of the built-in JRE classes and you want to make it conditional, you can’t use the variable names of the method parameters because that data is not compiled in. Instead, you need to refer to the parameters as “arg0”, “arg1”, “arg2”, etc.
For example, say you want to trigger a breakpoint if you ask for a super-long substring. The String.substring method looks like this:
public String substring(int beginIndex, int endIndex) { … }
In your breakpoint condition, you cannot refer to “beginIndex” or “endIndex”. Instead, your condition might look like this:
arg1-arg0 > 1000