Closed Bug 1489413 Opened 6 years ago Closed 4 years ago

viewSourceInDebugger should be able to specify a line and a column

Categories

(DevTools :: Shared Components, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jdescottes, Unassigned)

References

Details

At the moment, the viewSourceInDebugger helper only allows to jump to a specific line in the debugger. In case we have a minified file, it would be interesting to specify a column as well. For this we should also update the selectSource helper from devtools/client/debugger/new/panel.js to accept a column (I think the underlying selectSourceURL action already supports line+columns selectSource(url, line) { this._actions.selectSourceURL(url, { line }); }, (this part should be fixed on the debugger repo ultimately) The line for an event handler is currently found in the node actor's processHandlerForEvent method. The script object used to get the line also seems to have sourceStart property, which we might be able to use to get this information. The idea is to support the following flow: - find event in inspector - click on event badge and jump to debugger - pretty print the file - after pretty print, we should still be on the line for the event See Bug 1488654 for an example website where this is relevant, although a reduced test case should probably be easy to do here.
See Also: → 1488654
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.