Skip to content

In debugger, changing selected stack frame can highlight wrong line #2831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gramster opened this issue Apr 30, 2012 · 5 comments
Closed

In debugger, changing selected stack frame can highlight wrong line #2831

gramster opened this issue Apr 30, 2012 · 5 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@gramster
Copy link

I am running the Sunflower demo.

I set a breakpoint in drawSeed on this line: ctx.fillStyle = ORANGE;

Then changed the slider to hit the breakpoint.

If I click on different frames in the stack view in the debugger, I get an exception each time (see issue #2830), but focus does change in the editor.

The stack looks like:

Sunflower.drawSeed
Sunflower.drawFrame
Sunflower.function
...

If I click on Sunflower.drawSeed or Sunflower.function, the focus appears to be set correctly. If I click on Sunflower.drawFrame, focus moves to the line:

library('sunflower');

Editor build 6943, dartium build 6934, linux 64-bit.

@devoncarew
Copy link
Member

Set owner to @devoncarew.
Added Area-Editor, Triaged labels.

@devoncarew
Copy link
Member

I was able to reproduce this. Interestingly enough, if you set the breakpoint and then run the app, the reported line location for the drawFrame() method is correct. It's only when you run the app and then set the breakpoint that the line location is off.


Set owner to @mhausner.
Removed Area-Editor label.
Added Area-VM label.

@DartBot
Copy link

DartBot commented Jun 5, 2012

This comment was originally written by @mhausner


There is an explanation for what Devon observes. If the code in which you set a breakpoint is not compiled yet, the VM will remember the desired line location for the BP, which is the one that you say is 'correct'. Then, when the code gets compiled (or if it is already compiled because the function was executed before), the line location gets moved to the actual location that is recorded in the debugging info.

That said, the debugging info we have is sometimes incorrect, that's why you see the wrong line number. Improving the debug info accuracy is on my to do list.

@iposva-google
Copy link
Contributor

Added Accepted label.

@DartBot
Copy link

DartBot commented Jan 8, 2013

This comment was originally written by @mhausner


This should be fixed by now. Most recently we improved breakpoint location accuracy with change r16550.


Added Fixed label.

@gramster gramster added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Jan 8, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

4 participants