// The debugger needs to be created before the context, otherwise
// notification won't work
String rhinoDebug = System.getProperty("rhino.debug");
if (rhinoDebug != null) {
try {
debugger = new RhinoDebugger(rhinoDebug);
debugger.start();
contextFactory.addListener(debugger);
} catch (Exception e) {
e.printStackTrace();
}