mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 906963 - Add a "ignore caught exceptions" checkbox to the UI; r=dcamp
This commit is contained in:
parent
80038c3baf
commit
6a86294515
@ -1100,6 +1100,7 @@ pref("devtools.debugger.chrome-debugging-port", 6080);
|
|||||||
pref("devtools.debugger.remote-host", "localhost");
|
pref("devtools.debugger.remote-host", "localhost");
|
||||||
pref("devtools.debugger.remote-timeout", 20000);
|
pref("devtools.debugger.remote-timeout", 20000);
|
||||||
pref("devtools.debugger.pause-on-exceptions", false);
|
pref("devtools.debugger.pause-on-exceptions", false);
|
||||||
|
pref("devtools.debugger.ignore-caught-exceptions", true);
|
||||||
pref("devtools.debugger.source-maps-enabled", true);
|
pref("devtools.debugger.source-maps-enabled", true);
|
||||||
|
|
||||||
// The default Debugger UI settings
|
// The default Debugger UI settings
|
||||||
|
@ -384,7 +384,8 @@ ThreadState.prototype = {
|
|||||||
dumpn("ThreadState is connecting...");
|
dumpn("ThreadState is connecting...");
|
||||||
this.activeThread.addListener("paused", this._update);
|
this.activeThread.addListener("paused", this._update);
|
||||||
this.activeThread.addListener("resumed", this._update);
|
this.activeThread.addListener("resumed", this._update);
|
||||||
this.activeThread.pauseOnExceptions(Prefs.pauseOnExceptions);
|
this.activeThread.pauseOnExceptions(Prefs.pauseOnExceptions,
|
||||||
|
Prefs.ignoreCaughtExceptions);
|
||||||
this._handleTabNavigation();
|
this._handleTabNavigation();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1557,6 +1558,7 @@ let Prefs = new ViewHelpers.Prefs("devtools.debugger", {
|
|||||||
variablesOnlyEnumVisible: ["Bool", "ui.variables-only-enum-visible"],
|
variablesOnlyEnumVisible: ["Bool", "ui.variables-only-enum-visible"],
|
||||||
variablesSearchboxVisible: ["Bool", "ui.variables-searchbox-visible"],
|
variablesSearchboxVisible: ["Bool", "ui.variables-searchbox-visible"],
|
||||||
pauseOnExceptions: ["Bool", "pause-on-exceptions"],
|
pauseOnExceptions: ["Bool", "pause-on-exceptions"],
|
||||||
|
ignoreCaughtExceptions: ["Bool", "ignore-caught-exceptions"],
|
||||||
sourceMapsEnabled: ["Bool", "source-maps-enabled"]
|
sourceMapsEnabled: ["Bool", "source-maps-enabled"]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ function OptionsView() {
|
|||||||
dumpn("OptionsView was instantiated");
|
dumpn("OptionsView was instantiated");
|
||||||
|
|
||||||
this._togglePauseOnExceptions = this._togglePauseOnExceptions.bind(this);
|
this._togglePauseOnExceptions = this._togglePauseOnExceptions.bind(this);
|
||||||
|
this._toggleIgnoreCaughtExceptions = this._toggleIgnoreCaughtExceptions.bind(this);
|
||||||
this._toggleShowPanesOnStartup = this._toggleShowPanesOnStartup.bind(this);
|
this._toggleShowPanesOnStartup = this._toggleShowPanesOnStartup.bind(this);
|
||||||
this._toggleShowVariablesOnlyEnum = this._toggleShowVariablesOnlyEnum.bind(this);
|
this._toggleShowVariablesOnlyEnum = this._toggleShowVariablesOnlyEnum.bind(this);
|
||||||
this._toggleShowVariablesFilterBox = this._toggleShowVariablesFilterBox.bind(this);
|
this._toggleShowVariablesFilterBox = this._toggleShowVariablesFilterBox.bind(this);
|
||||||
@ -205,12 +206,14 @@ OptionsView.prototype = {
|
|||||||
|
|
||||||
this._button = document.getElementById("debugger-options");
|
this._button = document.getElementById("debugger-options");
|
||||||
this._pauseOnExceptionsItem = document.getElementById("pause-on-exceptions");
|
this._pauseOnExceptionsItem = document.getElementById("pause-on-exceptions");
|
||||||
|
this._ignoreCaughtExceptionsItem = document.getElementById("ignore-caught-exceptions");
|
||||||
this._showPanesOnStartupItem = document.getElementById("show-panes-on-startup");
|
this._showPanesOnStartupItem = document.getElementById("show-panes-on-startup");
|
||||||
this._showVariablesOnlyEnumItem = document.getElementById("show-vars-only-enum");
|
this._showVariablesOnlyEnumItem = document.getElementById("show-vars-only-enum");
|
||||||
this._showVariablesFilterBoxItem = document.getElementById("show-vars-filter-box");
|
this._showVariablesFilterBoxItem = document.getElementById("show-vars-filter-box");
|
||||||
this._showOriginalSourceItem = document.getElementById("show-original-source");
|
this._showOriginalSourceItem = document.getElementById("show-original-source");
|
||||||
|
|
||||||
this._pauseOnExceptionsItem.setAttribute("checked", Prefs.pauseOnExceptions);
|
this._pauseOnExceptionsItem.setAttribute("checked", Prefs.pauseOnExceptions);
|
||||||
|
this._ignoreCaughtExceptionsItem.setAttribute("checked", Prefs.ignoreCaughtExceptions);
|
||||||
this._showPanesOnStartupItem.setAttribute("checked", Prefs.panesVisibleOnStartup);
|
this._showPanesOnStartupItem.setAttribute("checked", Prefs.panesVisibleOnStartup);
|
||||||
this._showVariablesOnlyEnumItem.setAttribute("checked", Prefs.variablesOnlyEnumVisible);
|
this._showVariablesOnlyEnumItem.setAttribute("checked", Prefs.variablesOnlyEnumVisible);
|
||||||
this._showVariablesFilterBoxItem.setAttribute("checked", Prefs.variablesSearchboxVisible);
|
this._showVariablesFilterBoxItem.setAttribute("checked", Prefs.variablesSearchboxVisible);
|
||||||
@ -250,10 +253,21 @@ OptionsView.prototype = {
|
|||||||
* Listener handling the 'pause on exceptions' menuitem command.
|
* Listener handling the 'pause on exceptions' menuitem command.
|
||||||
*/
|
*/
|
||||||
_togglePauseOnExceptions: function() {
|
_togglePauseOnExceptions: function() {
|
||||||
let pref = Prefs.pauseOnExceptions =
|
Prefs.pauseOnExceptions =
|
||||||
this._pauseOnExceptionsItem.getAttribute("checked") == "true";
|
this._pauseOnExceptionsItem.getAttribute("checked") == "true";
|
||||||
|
|
||||||
DebuggerController.activeThread.pauseOnExceptions(pref);
|
DebuggerController.activeThread.pauseOnExceptions(
|
||||||
|
Prefs.pauseOnExceptions,
|
||||||
|
Prefs.ignoreCaughtExceptions);
|
||||||
|
},
|
||||||
|
|
||||||
|
_toggleIgnoreCaughtExceptions: function() {
|
||||||
|
Prefs.ignoreCaughtExceptions =
|
||||||
|
this._ignoreCaughtExceptionsItem.getAttribute("checked") == "true";
|
||||||
|
|
||||||
|
DebuggerController.activeThread.pauseOnExceptions(
|
||||||
|
Prefs.pauseOnExceptions,
|
||||||
|
Prefs.ignoreCaughtExceptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,6 +70,8 @@
|
|||||||
oncommand="DebuggerView.WatchExpressions._onCmdRemoveAllExpressions()"/>
|
oncommand="DebuggerView.WatchExpressions._onCmdRemoveAllExpressions()"/>
|
||||||
<command id="togglePauseOnExceptions"
|
<command id="togglePauseOnExceptions"
|
||||||
oncommand="DebuggerView.Options._togglePauseOnExceptions()"/>
|
oncommand="DebuggerView.Options._togglePauseOnExceptions()"/>
|
||||||
|
<command id="toggleIgnoreCaughtExceptions"
|
||||||
|
oncommand="DebuggerView.Options._toggleIgnoreCaughtExceptions()"/>
|
||||||
<command id="toggleShowPanesOnStartup"
|
<command id="toggleShowPanesOnStartup"
|
||||||
oncommand="DebuggerView.Options._toggleShowPanesOnStartup()"/>
|
oncommand="DebuggerView.Options._toggleShowPanesOnStartup()"/>
|
||||||
<command id="toggleShowOnlyEnum"
|
<command id="toggleShowOnlyEnum"
|
||||||
@ -160,6 +162,11 @@
|
|||||||
label="&debuggerUI.pauseExceptions;"
|
label="&debuggerUI.pauseExceptions;"
|
||||||
accesskey="&debuggerUI.pauseExceptions.key;"
|
accesskey="&debuggerUI.pauseExceptions.key;"
|
||||||
command="togglePauseOnExceptions"/>
|
command="togglePauseOnExceptions"/>
|
||||||
|
<menuitem id="ignore-caught-exceptions"
|
||||||
|
type="checkbox"
|
||||||
|
label="&debuggerUI.ignoreCaughtExceptions;"
|
||||||
|
accesskey="&debuggerUI.ignoreCaughtExceptions.key;"
|
||||||
|
command="toggleIgnoreCaughtExceptions"/>
|
||||||
<menuitem id="show-panes-on-startup"
|
<menuitem id="show-panes-on-startup"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
label="&debuggerUI.showPanesOnInit;"
|
label="&debuggerUI.showPanesOnInit;"
|
||||||
|
@ -38,6 +38,10 @@ function testWithFrame()
|
|||||||
is(gDebugger.DebuggerView.Options._pauseOnExceptionsItem.getAttribute("checked"), "true",
|
is(gDebugger.DebuggerView.Options._pauseOnExceptionsItem.getAttribute("checked"), "true",
|
||||||
"Pause on exceptions should be enabled from startup. ")
|
"Pause on exceptions should be enabled from startup. ")
|
||||||
|
|
||||||
|
// Disable ignore caught exceptions
|
||||||
|
gDebugger.DebuggerView.Options._ignoreCaughtExceptionsItem.setAttribute("checked", "false");
|
||||||
|
gDebugger.DebuggerView.Options._toggleIgnoreCaughtExceptions();
|
||||||
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
gPane.panelWin.gClient.addOneTimeListener("paused", function() {
|
gPane.panelWin.gClient.addOneTimeListener("paused", function() {
|
||||||
gDebugger.addEventListener("Debugger:FetchedVariables", function testA() {
|
gDebugger.addEventListener("Debugger:FetchedVariables", function testA() {
|
||||||
@ -103,6 +107,10 @@ function resumeAndFinish() {
|
|||||||
gDebugger.DebuggerView.Options._pauseOnExceptionsItem.setAttribute("checked", "false");
|
gDebugger.DebuggerView.Options._pauseOnExceptionsItem.setAttribute("checked", "false");
|
||||||
gDebugger.DebuggerView.Options._togglePauseOnExceptions();
|
gDebugger.DebuggerView.Options._togglePauseOnExceptions();
|
||||||
|
|
||||||
|
// Enable ignore caught exceptions
|
||||||
|
gDebugger.DebuggerView.Options._ignoreCaughtExceptionsItem.setAttribute("checked", "true");
|
||||||
|
gDebugger.DebuggerView.Options._toggleIgnoreCaughtExceptions();
|
||||||
|
|
||||||
is(gDebugger.Prefs.pauseOnExceptions, false,
|
is(gDebugger.Prefs.pauseOnExceptions, false,
|
||||||
"The pause-on-exceptions pref should have been set to false.");
|
"The pause-on-exceptions pref should have been set to false.");
|
||||||
|
|
||||||
|
@ -58,6 +58,10 @@ function testWithFrame()
|
|||||||
is(gDebugger.DebuggerView.Options._pauseOnExceptionsItem.getAttribute("checked"), "true",
|
is(gDebugger.DebuggerView.Options._pauseOnExceptionsItem.getAttribute("checked"), "true",
|
||||||
"Pause on exceptions should be enabled from startup. ")
|
"Pause on exceptions should be enabled from startup. ")
|
||||||
|
|
||||||
|
// Disable ignore caught exceptions
|
||||||
|
gDebugger.DebuggerView.Options._ignoreCaughtExceptionsItem.setAttribute("checked", "false");
|
||||||
|
gDebugger.DebuggerView.Options._toggleIgnoreCaughtExceptions();
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
gPane.panelWin.gClient.addOneTimeListener("resumed", function() {
|
gPane.panelWin.gClient.addOneTimeListener("resumed", function() {
|
||||||
gDebugger.addEventListener("Debugger:FetchedVariables", function testB() {
|
gDebugger.addEventListener("Debugger:FetchedVariables", function testB() {
|
||||||
@ -94,6 +98,9 @@ function testWithFrame()
|
|||||||
gDebugger.DebuggerView.Options._pauseOnExceptionsItem.setAttribute("checked", "false");
|
gDebugger.DebuggerView.Options._pauseOnExceptionsItem.setAttribute("checked", "false");
|
||||||
gDebugger.DebuggerView.Options._togglePauseOnExceptions();
|
gDebugger.DebuggerView.Options._togglePauseOnExceptions();
|
||||||
|
|
||||||
|
gDebugger.DebuggerView.Options._ignoreCaughtExceptionsItem.setAttribute("checked", "true");
|
||||||
|
gDebugger.DebuggerView.Options._toggleIgnoreCaughtExceptions();
|
||||||
|
|
||||||
is(gDebugger.Prefs.pauseOnExceptions, false,
|
is(gDebugger.Prefs.pauseOnExceptions, false,
|
||||||
"The pause-on-exceptions pref should have been set to false.");
|
"The pause-on-exceptions pref should have been set to false.");
|
||||||
|
|
||||||
|
@ -38,6 +38,11 @@
|
|||||||
<!ENTITY debuggerUI.pauseExceptions "Pause on exceptions">
|
<!ENTITY debuggerUI.pauseExceptions "Pause on exceptions">
|
||||||
<!ENTITY debuggerUI.pauseExceptions.key "E">
|
<!ENTITY debuggerUI.pauseExceptions.key "E">
|
||||||
|
|
||||||
|
<!-- LOCALIZATION NOTE (debuggerUI.pauseExceptions): This is the label for the
|
||||||
|
- checkbox that toggles ignoring caught exceptions. -->
|
||||||
|
<!ENTITY debuggerUI.ignoreCaughtExceptions "Ignore caught exceptions">
|
||||||
|
<!ENTITY debuggerUI.ignoreCaughtExceptions.key "C">
|
||||||
|
|
||||||
<!-- LOCALIZATION NOTE (debuggerUI.showPanesOnInit): This is the label for the
|
<!-- LOCALIZATION NOTE (debuggerUI.showPanesOnInit): This is the label for the
|
||||||
- checkbox that toggles visibility of panes when opening the debugger. -->
|
- checkbox that toggles visibility of panes when opening the debugger. -->
|
||||||
<!ENTITY debuggerUI.showPanesOnInit "Show panes on startup">
|
<!ENTITY debuggerUI.showPanesOnInit "Show panes on startup">
|
||||||
|
Loading…
Reference in New Issue
Block a user