I am debugging into some pretty complex software. Some string is constructed and replaced with a modified form in several different places (the stack is pages long), but I want to find out quickly where the String with a given value is first time constructed. Conditional breakpoints seem to be tricky on this as the condition itself constructs the string I want to detect...
Any ideas? I am using IntelliJ
To avoid creating a new string inside the condition, you can compare the content, not the String objects. For example like this:
Arrays.equals(str.toCharArray(), new char[]{'c', 'o', 'n', 't', 'e', 'n', 't'});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With