Closed Bug 1883905 Opened 8 months ago Closed 8 months ago

Allow tracing the full, possibly async execution of a given mochitest script line

Categories

(DevTools :: General, enhancement)

enhancement

Tracking

(firefox126 fixed)

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(2 files, 1 obsolete file)

Bug 1721427 introduced DEBUG_STEP=true or DEBUG_STEP=50 to trace all executions of a given mochitest script, and pause it for a given amount of time in ms when giving a number.
This feature helps easily spot where an async test is stuck within the test script.
Now it doesn't help understanding why the test is paused.

We could introduce another instruction in order to be able to trace all execution, including the possible async execution being initiated from a given test line.

This typically help go from shared global to DevTools module loader globals (DevtoolsLoader and BrowserLoaders).

The existing feature DEBUG_STEP will help understand that the test is stuck on line 49
DEBUG_STEP=true ./mach mochitest browser_target_command_detach.js
On [STEP] browser_target_command_detach.js @ 49:3 :: ↦ await secondTargetCommand.startListening();

And the new DEBUG_TRACE_LINE feature will help understand where the code is stuck, deeply nested into async code of DevTools.
DEBUG_TRACE_LINE=49 ./mach mochitest browser_target_command_detach.js
On [STEP] target-command.js @ 512:7 :: ↦ await this._onFirstTarget;

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Attachment #9389703 - Attachment description: Bug 1883905 - [devtools] Trace test from a given line → Bug 1883905 - [devtools] Trace test from a given line.
Depends on: 1885866
Blocks: js-tracer
Depends on: 1885910
Attachment #9390731 - Attachment is obsolete: true
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e432142f97da [devtools] Allow the tracer to track all current thread's globals. r=devtools-reviewers,nchevobbe https://hg.mozilla.org/integration/autoland/rev/3e88f5e01d26 [devtools] Trace test from a given line. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: