зеркало из https://github.com/mozilla/gecko-dev.git
Родитель
7c080ac298
Коммит
71eb5ec205
|
@ -0,0 +1,46 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>venkman test content page</title>
|
||||||
|
<script>
|
||||||
|
function doDebugger()
|
||||||
|
{
|
||||||
|
debugger;
|
||||||
|
}
|
||||||
|
|
||||||
|
function a()
|
||||||
|
{
|
||||||
|
var x = 1;
|
||||||
|
var y = "b";
|
||||||
|
var z = x + y;
|
||||||
|
|
||||||
|
b(x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
function b(x, y, z)
|
||||||
|
{
|
||||||
|
var recurse = 3;
|
||||||
|
|
||||||
|
c(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
function c(recurse, current)
|
||||||
|
{
|
||||||
|
if (typeof current == "undefined")
|
||||||
|
c(recurse, 1);
|
||||||
|
else if (current < recurse)
|
||||||
|
c(recurse, ++current);
|
||||||
|
else
|
||||||
|
doDebugger();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>venkman test content page</h1>
|
||||||
|
|
||||||
|
<h2>Choose your poison...</h2>
|
||||||
|
<button onclick="doDebugger();">debugger keyword, small stack</button><br>
|
||||||
|
<button onclick="a();">debugger keyword, interesting stack</button>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -34,6 +34,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var dbg;
|
var dbg;
|
||||||
|
var ts;
|
||||||
|
var cx;
|
||||||
|
|
||||||
const JSD_CTRID = "@mozilla.org/js/jsd/debugger-service;1";
|
const JSD_CTRID = "@mozilla.org/js/jsd/debugger-service;1";
|
||||||
const jsdIDebuggerService = Components.interfaces.jsdIDebuggerService;
|
const jsdIDebuggerService = Components.interfaces.jsdIDebuggerService;
|
||||||
|
@ -51,15 +53,20 @@ interruptHooker.onExecute =
|
||||||
function ih_exehook (cx, state, type, rv)
|
function ih_exehook (cx, state, type, rv)
|
||||||
{
|
{
|
||||||
dd ("onInterruptHook (" + cx + ", " + state + ", " + type + ")");
|
dd ("onInterruptHook (" + cx + ", " + state + ", " + type + ")");
|
||||||
return jsdIExecutionHook.HOOK_RETURN_CONTINUE;
|
return jsdIExecutionHook.RETURN_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
var debuggerHooker = new Object();
|
var debuggerHooker = new Object();
|
||||||
debuggerHooker.onExecute =
|
debuggerHooker.onExecute =
|
||||||
function dh_exehook (cx, state, type, rv)
|
function dh_exehook (aCx, state, type, rv)
|
||||||
{
|
{
|
||||||
dd ("onDebuggerHook (" + cx + ", " + state + ", " + type + ")");
|
dd ("onDebuggerHook (" + aCx + ", " + state + ", " + type + ")");
|
||||||
return jsdIExecutionHook.HOOK_RETURN_CONTINUE;
|
cx = aCx;
|
||||||
|
ts = state;
|
||||||
|
display ("Stopped for debugger keyword.");
|
||||||
|
dbg.enterNestedEventLoop();
|
||||||
|
display ("Continuing from debugger keyword.");
|
||||||
|
return jsdIExecutionHook.RETURN_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
function initDebugger()
|
function initDebugger()
|
||||||
|
|
|
@ -12,6 +12,7 @@ venkman.jar:
|
||||||
content/venkman/venkman-output-window.html (content/venkman-output-window.html)
|
content/venkman/venkman-output-window.html (content/venkman-output-window.html)
|
||||||
content/venkman/html-consts.js (content/html-consts.js)
|
content/venkman/html-consts.js (content/html-consts.js)
|
||||||
content/venkman/command-manager.js (content/command-manager.js)
|
content/venkman/command-manager.js (content/command-manager.js)
|
||||||
|
content/venkman/tests/testpage.html (content/tests/testpage.html)
|
||||||
content/venkman/venkman-overlay.xul (content/venkman-overlay.xul)
|
content/venkman/venkman-overlay.xul (content/venkman-overlay.xul)
|
||||||
content/venkman/venkman-overlay.js (content/venkman-overlay.js)
|
content/venkman/venkman-overlay.js (content/venkman-overlay.js)
|
||||||
skin/modern/venkman/venkman.css (skin/venkman.css)
|
skin/modern/venkman/venkman.css (skin/venkman.css)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче