Closed Bug 156861 Opened 22 years ago Closed 6 years ago

wrong line when stepping

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mschneider, Assigned: rginda)

References

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705) BuildID: 2002061104 we have our own debugger implementation, which is built on the JSD api. normally it's working fine, but the debugger sometimes displays a wrong line as the actual line. i've checked it and found the following script, failing in my own implementation as well as in the mozilla 1.1a (2002061104) debugger. Reproducible: Always Steps to Reproduce: 1. Create a html page with the following script: this.m_sSQL = ""; var strFTSearch = "bla"; if (strFTSearch != "*") { if ((1) && (2)) { this.m_sSQL += strFTSearch; this.m_sSQL += "%')"; } else if (3) { this.m_sSQL += strFTSearch; this.m_sSQL += "%')"; } else { this.m_sSQL += strFTSearch; this.m_sSQL += "%')"; } } else { var bal = "a"; } 2.execute the script step by step in the debugger Actual Results: single stepping with step over steps after the end of the first block at the end of the second block.. Expected Results: it should ignore all else's after leaving the first block
Reassigning to JavaScript Debugger component -
Assignee: rogerl → rginda
Component: JavaScript Engine → JavaScript Debugger
QA Contact: pschwartau → caillon
Confirming reported behavior with Mozilla trunk binary 20020701xx. I am running a developmental version of the JS Debugger. I do see what the reporter says. If I step through the code inside the test() function, whether via F10 or F11, here's what I see: I step until the last line of block one: { this.m_sSQL += strFTSearch; this.m_sSQL += "%')"; <<<-------------- STOPPED HERE } Then F10 or F11 takes me to the last line in block two: else if (3) { this.m_sSQL += strFTSearch; this.m_sSQL += "%')"; <<<-------------- WE STOP HERE } Then F10 or F11 take me out of the function. Note we might have expected to stop at the end of block three: else { this.m_sSQL += strFTSearch; this.m_sSQL += "%')"; <<<-------------- WE DON'T STOP HERE, THOUGH } My version of the JS Debugger is not showing these lines as breakable! I can't see any syntax errors in the code, so I'm puzzled at this -
Status: UNCONFIRMED → NEW
Ever confirmed: true
It's most likely a problem in the pc->line number map we generate from the source notes. If so, this is actually a js engine issue.
brendan: any thoughts?
Product: Core → Other Applications
This is still an annoying problem. I noticed that when running scripts which are loaded and run through eval the current line is always off by one (the next row).
The off-by-one problem when using Pretty Print is a different issue.
QA Contact: caillon → venkman
Component is obsolete so resolving bugs as INCOMPLETE
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: