Pretty-printed code with comma-separated commands have line numbers that do not match line numbers used elsewhere

RESOLVED DUPLICATE of bug 670002

Status

DevTools
Debugger
RESOLVED DUPLICATE of bug 670002
3 years ago
a month ago

People

(Reporter: hallvors, Unassigned)

Tracking

35 Branch

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

3 years ago
A bit hard to summarize but relatively easy to understand: if you have code like 

var a=1,b=2,c=3;
undefined('foo');

pretty-printing this file will turn it into

var a=1,
b=2,
c=3;
undefined('foo');

when the undefined() call throws, the console will contain a reference to the line that caused the error - but the line numbering is off, taking you to line #2 although the wrapping means it's now on line #4. 

This is especially insidious when you come from a separate part of the devtools entirely, say the performance profiler, and have less context - confused me a lot while trying to understand more of https://webcompat.com/issues/2082
This is a duplicate of bug 670002, we don't use sourcemaps in the console (or any other tools yet). We just landed bug 1132501 which is a big piece of that. Read my post for more info: http://jlongster.com/On-the-Road-to-Better-Sourcemaps-in-the-Firefox-Developer-Tools
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 670002
(Reporter)

Comment 2

3 years ago
Great, I look forward to that. Thanks James.

Updated

a month ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.