RESOLVED INVALID 35451
Inspector and debugger line numbers are different between Safari and Chrome
https://bugs.webkit.org/show_bug.cgi?id=35451
Summary Inspector and debugger line numbers are different between Safari and Chrome
Julie Parent
Reported 2010-02-26 14:06:35 PST
For multi-line statements, Safari uses the line number from the last line, and Chrome uses the line number from the first line. For example, given the following: <html> <head> <script> throw('which line number am i?' + 'I start on line 4' + ' but end on line 6'); </script> </head> <body> </body> </html> Safari will list the error and stop the debugger pointing to line 6, whereas chrome will point to line 4. My intuition is that the first line is more what developers would expect.
Attachments
Patrick Mueller
Comment 1 2010-03-10 13:10:15 PST
This is surely a V8 vs JSC issue, no? Change component? Since this type of behaviour - line number reporting for exceptions - is totally unspec'd w/r/t ECMAScript, it's not clear which one is "right", but I agree stopping at the "first line of the statement" is more intuitive. It would also be nice to try this in FF; I tried it but couldn't get FB to generate ANY line number information. But my FB foo is weak these days, maybe I did something wrong.
Note You need to log in before you can comment on or make changes to this bug.