mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 03:35:33 +00:00
- not built -
set up the excetions submenu checkmarks correctly onCreate load the source if it's not there in onDebugTrap add onDebugContinue to clear our state when we continue implement tmode command move onclose back to onunload, onclose doesn't fire if the user selects "Quit" from the file menu.
This commit is contained in:
parent
8b27bf568c
commit
e7ab8f45ae
@ -59,6 +59,34 @@ function con_step()
|
||||
return true;
|
||||
}
|
||||
|
||||
console.onTModeMenuCreate =
|
||||
function con_tmodecreate()
|
||||
{
|
||||
var check;
|
||||
|
||||
switch (getThrowMode())
|
||||
{
|
||||
case TMODE_IGNORE:
|
||||
check = "menu_TModeIgnore";
|
||||
break;
|
||||
case TMODE_TRACE:
|
||||
check = "menu_TModeTrace";
|
||||
break;
|
||||
case TMODE_BREAK:
|
||||
check = "menu_TModeBreak";
|
||||
break;
|
||||
}
|
||||
|
||||
var menu = document.getElementById("menu_TModeIgnore");
|
||||
menu.setAttribute("checked", "menu_TModeIgnore" == check);
|
||||
|
||||
menu = document.getElementById("menu_TModeTrace");
|
||||
menu.setAttribute("checked", "menu_TModeTrace" == check);
|
||||
|
||||
menu = document.getElementById("menu_TModeBreak");
|
||||
menu.setAttribute("checked", "menu_TModeBreak" == check);
|
||||
}
|
||||
|
||||
console.displayUsageError =
|
||||
function con_dusage (command)
|
||||
{
|
||||
@ -69,12 +97,31 @@ console.onDebugTrap =
|
||||
function con_ondt ()
|
||||
{
|
||||
var frame = getCurrentFrame();
|
||||
focusSource (frame.script.fileName, frame.line);
|
||||
var url = frame.script.fileName;
|
||||
|
||||
if (!console._sources[url])
|
||||
{
|
||||
function loaded ()
|
||||
{
|
||||
focusSource (url, frame.line);
|
||||
}
|
||||
loadSource (url, loaded);
|
||||
}
|
||||
else
|
||||
focusSource (url, frame.line);
|
||||
|
||||
console._stackOutlinerView.setStack(console.frames);
|
||||
console._stackOutlinerView.setCurrentFrame (getCurrentFrameIndex());
|
||||
enableDebugCommands()
|
||||
}
|
||||
|
||||
console.onDebugContinue =
|
||||
function con_ondc ()
|
||||
{
|
||||
console._stackOutlinerView.setStack(null);
|
||||
console._sourceOutlinerView.setCurrentLine(null);
|
||||
}
|
||||
|
||||
console.onLoad =
|
||||
function con_load (e)
|
||||
{
|
||||
@ -266,7 +313,8 @@ function con_ieval (e)
|
||||
refreshResultsArray();
|
||||
var l = $.length;
|
||||
$[l] = rv;
|
||||
display ("$[" + l + "] = " + formatValue (rv), MT_FEVAL_OUT);
|
||||
display (getMsg(MSN_FMT_TMP_ASSIGN, [l, formatValue (rv)]),
|
||||
MT_FEVAL_OUT);
|
||||
}
|
||||
else
|
||||
display (formatValue (rv), MT_FEVAL_OUT);
|
||||
@ -457,6 +505,33 @@ function con_iwhere ()
|
||||
return console.doCommandStep();
|
||||
}
|
||||
|
||||
console.onInputTMode =
|
||||
function con_itmode (e)
|
||||
{
|
||||
if (typeof e.inputData == "string")
|
||||
{
|
||||
if (e.inputData.search(/ignore/i) != -1)
|
||||
{
|
||||
setThrowMode(TMODE_IGNORE);
|
||||
return true;
|
||||
}
|
||||
else if (e.inputData.search(/trace/i) != -1)
|
||||
{
|
||||
setThrowMode(TMODE_TRACE);
|
||||
return true;
|
||||
}
|
||||
else if (e.inputData.search(/breaK/i) != -1)
|
||||
{
|
||||
setThrowMode(TMODE_BREAK);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* display the current throw mode */
|
||||
setThrowMode(getThrowMode());
|
||||
return true;
|
||||
}
|
||||
|
||||
console.onInputQuit =
|
||||
function con_iquit ()
|
||||
{
|
||||
@ -719,11 +794,11 @@ function con_tabcomplete (e)
|
||||
|
||||
}
|
||||
|
||||
console.onClose =
|
||||
function con_close (e)
|
||||
console.onUnload =
|
||||
function con_unload (e)
|
||||
{
|
||||
dd ("Application venkman, 'JavaScript Debugger' closing.");
|
||||
|
||||
dd ("Application venkman, 'JavaScript Debugger' unloading.");
|
||||
|
||||
detachDebugger();
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user