Closed Bug 1239681 Opened 5 years ago Closed 5 years ago
Pretty-printed code with comma-separated commands have line numbers that do not match line numbers used elsewhere
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
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 670002
Great, I look forward to that. Thanks James.
You need to log in before you can comment on or make changes to this bug.