Closed Bug 447923 Opened 13 years ago Closed 13 years ago

Javascript while loop cannot be debugged, its all in one line

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 462704

People

(Reporter: johnjbarton, Unassigned)

References

Details

Attachments

(1 file)

The way this code is compiled by SpiderMonkey or the way it comes back thru JSD at least makes debugging difficult.
The jsdIScript built from testMain has script.baseLinenumber 5 (ok), buit script.lineExtent is only 4 so the entire
while loop is one line and the debugger can't step through the loop. Note that if you uncomment the window.dump
on line 14, the entire loop is visible.
4function testMain()
5{
6 var x = 0;
7 var y = 13;
8 while (x < y)
9 {
10 testSub(x,y);
11 x++;
12 y-=2;
13 }
14 //window.dump("x = "+x+" y="+y+"\n");
15}
16function testSub(x,y) {
17 window.dump("x = "+x+" y="+y+"\n");
18}
19
20testMain();

(test case from Max Stepanov).
Attached file test case html file
Blocks: 449452
This goes to JSD for now - would be good if someone can verify if this is SpiderMonkey proper doing things, in which case it can be moved there...
Component: General → JavaScript Debugging APIs
Product: Firefox → Core
QA Contact: general → jsd
This looks like a duplicate of bug 462704 to me.
(In reply to comment #3)
> This looks like a duplicate of bug 462704 to me.

And to me.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 462704
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.