private void dispose() {
// ensure the debugger is closed
exitDebugger();
// reset the context factory class for future use
ContextFactory newGlobal = new ContextFactory();
setField(newGlobal, "hasCustomGlobal", Boolean.FALSE);
setField(newGlobal, "global", newGlobal);
setField(newGlobal, "sealed", Boolean.FALSE);
setField(newGlobal, "listeners", null);
setField(newGlobal, "disabledListening", Boolean.FALSE);