RESOLVED FIXED 20187
Line number reported to the JavaScript debugger (and exceptions) is off by one
https://bugs.webkit.org/show_bug.cgi?id=20187
Summary Line number reported to the JavaScript debugger (and exceptions) is off by one
Anthony Ricaud
Reported 2008-07-27 14:04:18 PDT
When debugging the inspector, the highlighted line is not the real debugged line. Steps to reproduce: 1) Open any webpage 2) Open the inspector, the inspector's inspector and active the debugger 3) Put a break on line 2185 (first line in WebInspector.documentClick) 4) Click anywhere in the first inspector, this pauses the debugger 5) Step over next function call Actual behaviour: anchor is still undefined Expected behaviour: anchor should have a value, null or HTMLAnchorElement. If you continue to step over, you can see that blank lines could be highlighted.
Attachments
Screenshot after step 5 (105.24 KB, image/png)
2008-07-27 14:06 PDT, Anthony Ricaud
no flags
Anthony Ricaud
Comment 1 2008-07-27 14:06:13 PDT
Created attachment 22510 [details] Screenshot after step 5
Timothy Hatcher
Comment 2 2008-07-27 17:00:42 PDT
I was seeing this off by one or more lines error with other inspector code. I think this is a regression since the changes Oliver made to fix exceptions.
Alex Nicolaou
Comment 3 2008-08-24 20:25:42 PDT
I went all the way back to the first nightly that had the debugger integrated into the web inspector and the problem exists. In my case it's off by about 64 lines but I'm sure this varies depending on what your script is. The prior builds with drosera don't work for me (drosera always crashes) so I didn't dig further back than that.
Timothy Hatcher
Comment 4 2008-10-04 21:11:31 PDT
With the fix for bug 19053, this bug can be seen on webkit.org. Just attach the debugger, pause and reload the page.
Oliver Hunt
Comment 5 2008-10-04 23:45:12 PDT
Okay, my testing shows that the original bug here has been fixed at some point along the line. Am filing new bug for tim's issue.
Note You need to log in before you can comment on or make changes to this bug.