Closed Bug 1825511 Opened 11 months ago Closed 10 months ago

Log Javascript traces to stdout with hyperlinks which can be opened in the debugger

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(firefox115 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Regressed 1 open bug)

Details

Attachments

(1 file)

There is some convention in terminals to print URLs that can be clicked.
We could log link to each frame location that Firefox can interpret and open right away in the debugger.
We could log frame locations by adding a suffix to URLs @${line}:${column}.
When opening Firefox with such URL and the debugger is already opened and it knows about this location, we could open this location in the debugger.
I imagine this feature could also be used in some other context, like opening sources in the browser from VS.Code or similar.

The JavaScript tracer will log special format of links, including a precise location,
by appending @${line}:${column} to each frame's source's URL.
This URL pattern is later interpreted by DevTools command line handler in order
to automatically open the source's location in the debugger.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f7361c0f959
[devtools] Log JavaScript traces to stdout with hyperlinks and handle them in firefox startup. r=nchevobbe,devtools-reviewers
Regressions: 1832824
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Regressions: 1845768
You need to log in before you can comment on or make changes to this bug.