Is it possible to set a conditional breakpoint on ...
# getting-started
r
Is it possible to set a conditional breakpoint on every String value created in a complex codebase and catch the creation of a specific String? (Regardless of which constructor to java.lang.String is used). I tracked down my specific bug but became curious on how to do it. Or can I get a creation trace via jvm flight recorder?
k
Try setting a breakpoint on every (public & package-private) constructor of java.lang.String (I expect Kotlin strings will ultimately be Java Strings) and set a condition on the breakpoint. Be prepared for your app to run very slowly.