/** * Sets whether execution should break when a script exception is thrown. */ public void setBreakOnExceptions(boolean value) { dim.setBreakOnExceptions(value); debugGui.getMenubar().getBreakOnExceptions().setSelected(value); }
/** * Sets whether execution should break when a script exception is thrown. */ public void setBreakOnExceptions(boolean value) { dim.setBreakOnExceptions(value); debugGui.getMenubar().getBreakOnExceptions().setSelected(value); }
/** * Sets whether execution should break when a script exception is thrown. */ public void setBreakOnExceptions(boolean value) { dim.setBreakOnExceptions(value); debugGui.getMenubar().getBreakOnExceptions().setSelected(value); }
public Object exec() { debugGui.setVisible(true); dim.setBreak(); dim.setBreakOnEnter(true); dim.setBreakOnExceptions(true); return script.exec(cx, scope); }
Object source = e.getSource(); if (source == breakOnExceptions) { debugGui.dim.setBreakOnExceptions(breakOnExceptions.isSelected()); } else if (source == breakOnEnter) { debugGui.dim.setBreakOnEnter(breakOnEnter.isSelected());
Object source = e.getSource(); if (source == breakOnExceptions) { debugGui.dim.setBreakOnExceptions(breakOnExceptions.isSelected()); } else if (source == breakOnEnter) { debugGui.dim.setBreakOnEnter(breakOnEnter.isSelected());
Object source = e.getSource(); if (source == breakOnExceptions) { debugGui.dim.setBreakOnExceptions(breakOnExceptions.isSelected()); } else if (source == breakOnEnter) { debugGui.dim.setBreakOnEnter(breakOnEnter.isSelected());
/** * Show the debugger */ public synchronized void show() { if (!isActive()) { activate(); } dim.setBreakOnExceptions(true); dim.setBreak(); dim.attachTo(factory); gui.pack(); gui.setSize(600, 460); gui.setVisible(true); }
/** * Show the debugger */ public synchronized void show() { if (!isActive()) { activate(); } dim.setBreakOnExceptions(true); dim.setBreak(); dim.attachTo(factory); gui.pack(); gui.setSize(600, 460); gui.setVisible(true); }
/** * Show the debugger */ public synchronized void show() { if (!isActive()) { activate(); } dim.setBreakOnExceptions(true); dim.setBreak(); dim.attachTo(factory); gui.pack(); gui.setSize(600, 460); gui.setVisible(true); }
/** * Starts an interactive JavaScript debugger, and break at the next JavaScript execution. * * <p> * This is useful during debugging a test so that you can step execute and inspect state of JavaScript. * This will launch a Swing GUI, and the method returns immediately. * * <p> * Note that installing a debugger appears to make an execution of JavaScript substantially slower. * * <p> * TODO: because each script block evaluation in HtmlUnit is done in a separate Rhino context, * if you step over from one script block, the debugger fails to kick in on the beginning of the next script block. * This makes it difficult to set a break point on arbitrary script block in the HTML page. We need to fix this * by tweaking {@link Dim.StackFrame#onLineChange(Context, int)}. */ public Dim interactiveJavaScriptDebugger() { Global global = new Global(); HtmlUnitContextFactory cf = getJavaScriptEngine().getContextFactory(); global.init(cf); Dim dim = org.mozilla.javascript.tools.debugger.Main.mainEmbedded(cf, global, "Rhino debugger: " + getName()); // break on exceptions. this catch most of the errors dim.setBreakOnExceptions(true); return dim; } }
/** * Starts an interactive JavaScript debugger, and break at the next JavaScript execution. * * <p> * This is useful during debugging a test so that you can step execute and inspect state of JavaScript. * This will launch a Swing GUI, and the method returns immediately. * * <p> * Note that installing a debugger appears to make an execution of JavaScript substantially slower. * * <p> * TODO: because each script block evaluation in HtmlUnit is done in a separate Rhino context, * if you step over from one script block, the debugger fails to kick in on the beginning of the next script block. * This makes it difficult to set a break point on arbitrary script block in the HTML page. We need to fix this * by tweaking {@link Dim.StackFrame#onLineChange(Context, int)}. */ public Dim interactiveJavaScriptDebugger() { Global global = new Global(); HtmlUnitContextFactory cf = getJavaScriptEngine().getContextFactory(); global.init(cf); Dim dim = org.mozilla.javascript.tools.debugger.Main.mainEmbedded(cf, global, "Rhino debugger: " + getName()); // break on exceptions. this catch most of the errors dim.setBreakOnExceptions(true); return dim; } }
/** * Starts an interactive JavaScript debugger, and break at the next JavaScript execution. * * <p> * This is useful during debugging a test so that you can step execute and inspect state of JavaScript. * This will launch a Swing GUI, and the method returns immediately. * * <p> * Note that installing a debugger appears to make an execution of JavaScript substantially slower. * * <p> * TODO: because each script block evaluation in HtmlUnit is done in a separate Rhino context, * if you step over from one script block, the debugger fails to kick in on the beginning of the next script * block. * This makes it difficult to set a break point on arbitrary script block in the HTML page. We need to fix this * by tweaking {@link org.mozilla.javascript.tools.debugger.Dim.StackFrame#onLineChange(Context, int)}. */ public Dim interactiveJavaScriptDebugger() { Global global = new Global(); HtmlUnitContextFactory cf = ((JavaScriptEngine)getJavaScriptEngine()).getContextFactory(); global.init(cf); Dim dim = org.mozilla.javascript.tools.debugger.Main.mainEmbedded(cf, global, "Rhino debugger: " + testDescription.getDisplayName()); // break on exceptions. this catch most of the errors dim.setBreakOnExceptions(true); return dim; } }
/** * Starts an interactive JavaScript debugger, and break at the next * JavaScript execution. * * <p> This is useful during debugging a test so that you can step * execute and inspect state of JavaScript. This will launch a Swing * GUI, and the method returns immediately. * * <p> Note that installing a debugger appears to make an execution of * JavaScript substantially slower. * * <p> TODO: because each script block evaluation in HtmlUnit is done in * a separate Rhino context, if you step over from one script block, the * debugger fails to kick in on the beginning of the next script block. * This makes it difficult to set a break point on arbitrary script * block in the HTML page. We need to fix this by tweaking * {@link Dim.StackFrame#onLineChange(Context, int)}. */ public Dim interactiveJavaScriptDebugger() { Global global = new Global(); HtmlUnitContextFactory cf = getJavaScriptEngine().getContextFactory(); global.init(cf); Dim dim = org.mozilla.javascript.tools.debugger.Main.mainEmbedded(cf, global, "Rhino debugger: " + getName()); // break on exceptions. this catch most of the errors dim.setBreakOnExceptions(true); return dim; } }
/** * Starts an interactive JavaScript debugger, and break at the next JavaScript execution. * * <p> * This is useful during debugging a test so that you can step execute and inspect state of JavaScript. * This will launch a Swing GUI, and the method returns immediately. * * <p> * Note that installing a debugger appears to make an execution of JavaScript substantially slower. * * <p> * TODO: because each script block evaluation in HtmlUnit is done in a separate Rhino context, * if you step over from one script block, the debugger fails to kick in on the beginning of the next script block. * This makes it difficult to set a break point on arbitrary script block in the HTML page. We need to fix this * by tweaking {@link Dim.StackFrame#onLineChange(Context, int)}. */ public Dim interactiveJavaScriptDebugger() { Global global = new Global(); HtmlUnitContextFactory cf = ((JavaScriptEngine)getJavaScriptEngine()).getContextFactory(); global.init(cf); Dim dim = org.mozilla.javascript.tools.debugger.Main.mainEmbedded(cf, global, "Rhino debugger: " + getName()); // break on exceptions. this catch most of the errors dim.setBreakOnExceptions(true); return dim; } }