Open
Bug 1826389
Opened 2 years ago
Updated 2 years ago
Allow starting javascript tracing via an chrome-only API on console object
Categories
(DevTools :: Debugger, enhancement)
DevTools
Debugger
Tracking
(Not tracked)
ASSIGNED
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
Bug 1817834 will introduce a chrome only way to toggle JavaScript tracing.
But this is still tedious as it requires the following code to toggle it:
const {
startTracing,
stopTracing,
} = ChromeUtils.import("resource://devtools/server/tracer/tracer.jsm");
startTracing({ prefix: "myPrefix" });
[... run some code...]
stopTracing();
Exposing it on console via console.jsTrace()
and console.jsTraceEnd()
methods (or similar) sounds like an ideal location for such debugging API.
An incremental improvement would be to expose a ChromeOnly API easily available from all chrome globals and later expose it to all pages via bug 1827616.
Assignee | ||
Comment 1•2 years ago
|
||
For now, you could only toggle tracing from the debugger interface.
Having an API would help debugging tests and start'n stop tracing
from precise locations.
This would also ease passing parameters to have configurable traces.
Updated•2 years ago
|
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Updated•2 years ago
|
Attachment #9326931 -
Attachment description: Bug 1817834 - [devtools] Allow to start and stop JavaScript tracing via console.jsTrace() and console.jsTraceEnd(). → Bug 1826389 - [devtools] Allow to start and stop JavaScript tracing via console.jsTrace() and console.jsTraceEnd().
Assignee | ||
Updated•2 years ago
|
Summary: Allow starting javascript tracing via an API from web pages → Allow starting javascript tracing via an chrome-only API on console object
You need to log in
before you can comment on or make changes to this bug.
Description
•