Search code examples
intellij-ideaclassloaderbreakpoints

Setting a breakpoint for when a Java class is loaded in IntelliJ IDEA


Is there a way to set a breakpoint for when a particular Java class is loaded in IntelliJ IDEA?


Solution

  • Not that I know of. But if you are trying to determine from where a class is first being loaded, you could put a break point in the constructor (or static fields/block) of the class, and look at the stack trace. That should tell you where the first call to the class is being made.