Odd breakpoint behavior in loops

Nov 9, 2010 at 10:11 AM

I've noticed that if I set a breakpoint on a line that is inside of a loop JINT will stop on the loop declaration instead.
For example, if a breakpoint is set on line 5, it will first stop on line 1.
Then if I step over line 1 and run to breakpoint it will correctly stop at line 5 for each loop.

for(i=0; i<3; i++) // line 1
  var hello;
  var world;
  var here;   // breakpoint on this line (line num 5)

I've got a hard time seeing how I might have implemented something wrong to get this behavior, and believe it to be a bug.
What I have noticed is that "Jint.Debugger.DebugInformation info" does include the whole for loop in  CurrentStatement.Source.Code, which I find odd.
I´m currently setting the debug breakpoint to the line number and character pos is always set to zero (I hope I don't need to offset the character pos into the loop to get this to work!).

Best regards

Nov 9, 2010 at 4:14 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.