Closed Bug 834069 Opened 8 years ago Closed 8 years ago

Create a command to list sources in the debugger

Categories

(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 21

People

(Reporter: rcampbell, Assigned: rcampbell)

Details

Attachments

(1 file, 2 obsolete files)

'Twould be nice to have a command to list loaded sources in the debugger via the command line.
Attached patch debug list WIP (obsolete) — Splinter Review
WIP needs a test
Attached patch dbg list (obsolete) — Splinter Review
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+
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.
Attached patch dbg list updatedSplinter Review
added a new string for debuggerClosed.
Attachment #705663 - Attachment is obsolete: true
Attachment #705845 - Flags: review+
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
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 21
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.