Closed Bug 1830915 Opened 1 year ago Closed 6 months ago

Expose a console command to toggle JavaScript tracing

Categories

(DevTools :: Debugger, enhancement)

enhancement

Tracking

(firefox122 fixed)

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Given that exposing console API to web page is a bit tricky (bug 1826389), it can be helpful to expose toggling the tracer via a WebConsole command (ex: :trace ...options... ).

It would be especially useful to start exposing experimental options to help fine tune the behavior of the tracer. The button in the debugger makes it hard to expose options easily.

Depends on: 1830919
Attachment #9336366 - Attachment description: Bug 1830915 - [devtools] Expose a "trace" webconsole command. → Bug 1830915 - [devtools] Expose a "trace" webconsole command to toggle the JavaScript tracer.

We can start printing usage description right into the console by using :command --help or :command --usage.

I also simplified the integration between eval-with-debugger and manager
in order to fully delegate command execution to the manager.

Also improved the jsdoc for the register method. This new feature will be covered by test in the next patch.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c92b70635f3a
[devtools] Introduce a generic mechanism to print web console command usage. r=devtools-reviewers,nchevobbe,flod,fluent-reviewers
https://hg.mozilla.org/integration/autoland/rev/5595614a209c
[devtools] Expose a "trace" webconsole command to toggle the JavaScript tracer. r=devtools-reviewers,nchevobbe,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: