2021-04-24 16:25:09 +00:00
|
|
|
startDebugger = function () {
|
|
|
|
|
|
|
|
var runnable = {
|
|
|
|
run: function () {
|
|
|
|
main.dispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-04-24 19:01:23 +00:00
|
|
|
var context = Packages.org.mozilla.javascript.Context.getCurrentContext(); // Within the current context...
|
2021-04-24 16:25:09 +00:00
|
|
|
var contextFactory = context.getFactory();
|
2021-04-24 19:01:23 +00:00
|
|
|
var scope = Packages.org.mozilla.javascript.tools.shell.Environment(runnable.__parent__); // and the scope of the runnable variable's parent ...
|
|
|
|
var main = Packages.org.mozilla.javascript.tools. debugger.Main.mainEmbedded(contextFactory, scope, 'Debugger'); // start a debugging session ...
|
|
|
|
main.setExitAction(java.lang.Runnable(runnable)); // , clean the resources at exit time...
|
|
|
|
main.setVisible(true); // and make it visible/
|
2021-04-24 16:25:09 +00:00
|
|
|
|
|
|
|
}
|