Getting a NullPointerException with every call to DebuggerClient:
java.lang.NullPointerException
at freemarker.debug.DebuggerClient$LocalDebuggerProxy.addDebuggerListener(DebuggerClient.java:163)
java.lang.NullPointerException
at freemarker.debug.DebuggerClient$LocalDebuggerProxy.removeBreakpoints(DebuggerClient.java:194)
java.lang.NullPointerException
at freemarker.debug.DebuggerClient$LocalDebuggerProxy.getSuspendedEnvironments(DebuggerClient.java:179)
This is due to the way the Debugger object is stored. I have a patch that fixes the problem by storing the Debugger in a member variable of the RmiDebuggerService.
I originally saw this as an RMI exception, and traced it down to RemoteObject.toStub(new RmiDebuggerImpl()) since toStub holds onto a weak reference (so it was getting garbage collected before being returned).
Patch to fix the problem