01. Attaching the Debugger Through the Source - ThisTestUser/Java-Debugger GitHub Wiki
If you have the source, that's great! In order to first access the Debugger classes, you'll have first to attach Debugger.jar as a library.
Then, add DebuggerHook.injectDebugger()
at any point where you want to debug. If you are unsure of where to attach it, look into a class you are interested in and add it to the initializer function. In order to edit non-static fields or edit non-static methods, you'll need the instance argument to be non-null. If the class was loaded using a custom ClassLoader, you should make the ClassLoader argument non-null.
As you can see here, I injected the Debugger into the instance function. Note that every time this method is ran, another tab will pop up in Java Debugger. You don't have to inject the Debugger into the initializer, though.
Once you injected into all the classes you want, the Debugger should pop up when any of those injectDebugger()
methods are called. Remember to include Debugger.jar in your compiled JAR file, or the program will crash!