Link logged JS source URLs (including row and column info) with Debugger

NEW
Unassigned

Status

()

Firefox
Developer Tools: Console
P3
normal
a year ago
a year ago

People

(Reporter: sebo, Unassigned)

Tracking

55 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
When logging a JavaScript source URL to the console it should be linked to the Debugger. I.e. clicking on it should result in switching to the Debugger and opening the related source there.

Also, if the row and column information are given, the related line should be highlighted and the text cursor be placed at the related column.

Example:
1. Open the Web Console on https://developer.mozilla.org/en-US/
2. Execute the following via the command line:
   console.log("https://developer.mozilla.org/en-US/:6:20")
3. Click the logged URL

=> The DevTools should switch to the Debugger, open the show_bug.cgi source, highlight line 63 and set the caret to column 10.

FWIW this feature is working as described in the Chrome DevTools (except that the caret is only visible on JS files, not HTML files including JS) and was requested on Stack Overflow[1].

Sebastian

[1] http://stackoverflow.com/q/43666085/432681
I'm not sure I understand the use case where you would console.log to a particular source on the page - when would you use this?

To implement something like this I guess we can work around making a change to reps by modifying the openLink function in jsterm to detect a URL that the debugger knows about and open the debugger.
Flags: needinfo?(sebastianzartner)
Priority: -- → P3
(Reporter)

Comment 2

a year ago
The use case mentioned in the Stack Overflow question is creating your own logging function but being able to reference other parts of the code.

Sebastian
Flags: needinfo?(sebastianzartner)
You need to log in before you can comment on or make changes to this bug.