Bug 20187 - Line number reported to the JavaScript debugger (and exceptions) is off by one
Summary: Line number reported to the JavaScript debugger (and exceptions) is off by one
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-27 14:04 PDT by Anthony Ricaud
Modified: 2008-10-04 23:45 PDT (History)
3 users (show)

See Also:


Attachments
Screenshot after step 5 (105.24 KB, image/png)
2008-07-27 14:06 PDT, Anthony Ricaud
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 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.
Comment 1 Anthony Ricaud 2008-07-27 14:06:13 PDT
Created attachment 22510 [details]
Screenshot after step 5
Comment 2 Timothy Hatcher 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.
Comment 3 Alex Nicolaou 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.
Comment 4 Timothy Hatcher 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.
Comment 5 Oliver Hunt 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.