Create a command to list sources in the debugger

RESOLVED FIXED in Firefox 21

Status

()

Firefox
Developer Tools: Graphic Commandline and Toolbar
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rc, Assigned: rc)

Tracking

unspecified
Firefox 21
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
'Twould be nice to have a command to list loaded sources in the debugger via the command line.
(Assignee)

Comment 1

5 years ago
Created attachment 705633 [details] [diff] [review]
debug list WIP

WIP needs a test
(Assignee)

Comment 2

5 years ago
Created attachment 705663 [details] [diff] [review]
dbg list
Attachment #705633 - Attachment is obsolete: true
Attachment #705663 - Flags: review?(past)
Comment on attachment 705663 [details] [diff] [review]
dbg list

Review of attachment 705663 [details] [diff] [review]:
-----------------------------------------------------------------

Nice! We might want to extend it in the future to choose between the original or unminified scripts, but this is fine for now.

::: browser/devtools/commandline/BuiltinCommands.jsm
@@ +1270,5 @@
> +    exec: function(args, context) {
> +      let dbg = getPanel(context, "jsdebugger");
> +      let doc = context.environment.chromeDocument;
> +      if (!dbg) {
> +        return gcli.lookup("debuggerStopped");

This prints: "The debugger must be opened before setting breakpoints". I think we should either add a new string or maybe make the existing one more generic ("The debugger must be opened first" or "The debugger must be open for this operation to proceed").
Attachment #705663 - Flags: review?(past) → review+
(Assignee)

Comment 4

5 years ago
ah yeah, good point. I'll add a new, more generic string.

Had the idea for a couple of optional parameters, a filter string if you want to limit your search by domain or filename and your suggestion's a good one as well.
(Assignee)

Comment 5

5 years ago
Created attachment 705845 [details] [diff] [review]
dbg list updated

added a new string for debuggerClosed.
Attachment #705663 - Attachment is obsolete: true
Attachment #705845 - Flags: review+
(Assignee)

Comment 6

5 years ago
https://hg.mozilla.org/integration/fx-team/rev/82196bf32137
Status: NEW → ASSIGNED
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/82196bf32137
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 21
You need to log in before you can comment on or make changes to this bug.