Skip to content

Commit

Permalink
Issue 6316: Improve usability of long (and wide) stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
janodvarko committed Mar 27, 2013
1 parent 68f4214 commit 50240f1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
19 changes: 12 additions & 7 deletions extension/content/firebug/debugger/stack/callstackPanel.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ define([
"firebug/chrome/menu", "firebug/chrome/menu",
"firebug/debugger/stack/stackFrameRep", "firebug/debugger/stack/stackFrameRep",
"firebug/debugger/stack/stackTrace", "firebug/debugger/stack/stackTrace",
"firebug/lib/options",
], ],
function(Obj, Firebug, FBTrace, FirebugReps, Events, Wrapper, StackFrame, Css, Arr, Dom, Menu, function(Obj, Firebug, FBTrace, FirebugReps, Events, Wrapper, StackFrame, Css, Arr, Dom, Menu,
StackFrameRep, StackTrace) { StackFrameRep, StackTrace, Options) {


// ********************************************************************************************* // // ********************************************************************************************* //
// Constants // Constants
Expand Down Expand Up @@ -209,6 +210,10 @@ CallstackPanel.prototype = Obj.extend(Firebug.Panel,


Css.setClass(this.panelNode, "objectBox-stackTrace"); Css.setClass(this.panelNode, "objectBox-stackTrace");


// Update visibility of stack frame arguments.
var name = "showStackFrameArguments";
this.updateOption(name, Options.get(name));

if (trace && trace.frames.length != 0) if (trace && trace.frames.length != 0)
{ {
var rep = Firebug.getRep(trace, this.context); var rep = Firebug.getRep(trace, this.context);
Expand Down Expand Up @@ -261,9 +266,9 @@ CallstackPanel.prototype = Obj.extend(Firebug.Panel,
"callstack.option.tip.Omit_Object_Path_Stack")); "callstack.option.tip.Omit_Object_Path_Stack"));


// Show/hide stack frame arguments. // Show/hide stack frame arguments.
items.push(Menu.optionMenu("callstack.option.Hide_Arguments", items.push(Menu.optionMenu("callstack.option.Show_Arguments",
"hideStackFrameArguments", "showStackFrameArguments",
"callstack.option.tip.Hide_Arguments")); "callstack.option.tip.Show_Arguments"));


return items; return items;
}, },
Expand Down Expand Up @@ -299,12 +304,12 @@ CallstackPanel.prototype = Obj.extend(Firebug.Panel,


updateOption: function(name, value) updateOption: function(name, value)
{ {
if (name == "hideStackFrameArguments") if (name == "showStackFrameArguments")
{ {
if (value) if (value)
Css.setClass(this.panelNode, "hideArguments");
else
Css.removeClass(this.panelNode, "hideArguments"); Css.removeClass(this.panelNode, "hideArguments");
else
Css.setClass(this.panelNode, "hideArguments");
} }
}, },
}); });
Expand Down
2 changes: 1 addition & 1 deletion extension/defaults/preferences/firebug.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pref("extensions.firebug.breakOnExceptions", false);


// Stack // Stack
pref("extensions.firebug.omitObjectPathStack", false); pref("extensions.firebug.omitObjectPathStack", false);
pref("extensions.firebug.hideStackFrameArguments", false); pref("extensions.firebug.showStackFrameArguments", true);


// DOM // DOM
pref("extensions.firebug.showUserProps", true); pref("extensions.firebug.showUserProps", true);
Expand Down
8 changes: 4 additions & 4 deletions extension/locale/en-US/firebug.properties
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -983,11 +983,11 @@ OmitObjectPathStack=Omit Toolbar Stack
callstack.option.tip.Omit_Object_Path_Stack=Do not display the object path stack callstack.option.tip.Omit_Object_Path_Stack=Do not display the object path stack
Load_Original_Source=Load Original Source Load_Original_Source=Load Original Source
css.tip.Load_Original_Source=Discard the changes and load the original CSS css.tip.Load_Original_Source=Discard the changes and load the original CSS
# LOCALIZATION NOTE (callstack.option.Hide_Arguments, callstack.option.tip.Hide_Arguments): # LOCALIZATION NOTE (callstack.option.Show_Arguments, callstack.option.tip.Show_Arguments):
# Stack side panel option (located in tab's option menu). If set to true, # Stack side panel option (located in tab's option menu). If set to true,
# function arguments are not displayed # function arguments are displayed
callstack.option.Hide_Arguments=Hide Arguments callstack.option.Show_Arguments=Show Arguments
callstack.option.tip.Hide_Arguments=Do not display function arguments callstack.option.tip.Show_Arguments=Display also function arguments
# LOCALIZATION NOTE (Copy_Rule_Declaration, css.tip.Copy_Rule_Declaration): # LOCALIZATION NOTE (Copy_Rule_Declaration, css.tip.Copy_Rule_Declaration):
# Menu item label and tooltip used in CSS panel/Style side panel context menu. # Menu item label and tooltip used in CSS panel/Style side panel context menu.
# Allows copying the current CSS rule including all its properties to the clipboard. # Allows copying the current CSS rule including all its properties to the clipboard.
Expand Down
4 changes: 2 additions & 2 deletions extension/skin/classic/callstack.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
} }


/** /**
* The one-line list of arguments is hidden if the frame is exapanded. So, the source * The one-line list of arguments is hidden if the frame is expanded. So, the source
* link is nicely visible. * link is nicely visible.
* There is also an option that allows to hide the argument list by default * There is also an option that allows to hide the argument list by default
* (see extensions.firebug.hideStackFrameArguments). * (see extensions.firebug.showStackFrameArguments).
*/ */
.objectBox-stackFrame.opened .arguments, .objectBox-stackFrame.opened .arguments,
.panelNode-callstack.hideArguments .objectBox-stackFrame .arguments { .panelNode-callstack.hideArguments .objectBox-stackFrame .arguments {
Expand Down

0 comments on commit 50240f1

Please sign in to comment.