Skip to content

Breakpoint is ignored after code is edited (no reload). #433

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
turnidge opened this issue Nov 10, 2016 · 11 comments
Closed

Breakpoint is ignored after code is edited (no reload). #433

turnidge opened this issue Nov 10, 2016 · 11 comments

Comments

@turnidge
Copy link

Steps to reproduce:

  1. Create a new flutter application with the demo app.
  2. Set a breakpoint on the line with "_counter++;"

screen shot 2016-11-10 at 1 35 50 pm

  1. Debug "main.dart.
  2. Add 6 lines of comments above the breakpoint. Do not save or reload.

screen shot 2016-11-10 at 1 47 35 pm

  1. Click the (+) button in the demo app.

screen shot 2016-11-10 at 1 48 10 pm

EXPECTED: Program stops at breakpoint in the original, unedited source code. This source code is known to the vm and is available through the vm service.
ACTUAL: Breakpoint is apparently ignored.

cc'ing @johnmccutchan

@turnidge turnidge changed the title Breakpoint is ignored after code is edited. Breakpoint is ignored after code is edited (no reload). Nov 10, 2016
@johnmccutchan
Copy link

cc @mit-mit

@mit-mit
Copy link
Member

mit-mit commented Nov 11, 2016

@pq is this the same as #305 even though there is no reload in this case?

@johnmccutchan
Copy link

@mit-mit This is a different issue. It appears that as the programmer modifies their source code the plugin is telling the VM to move breakpoints. This confuses the VM because it is running the unmodified source code. The plugin must always update source code + breakpoints atomically.

@mit-mit
Copy link
Member

mit-mit commented Nov 18, 2016

It appears that as the programmer modifies their source code the plugin is telling the VM to move breakpoints. This confuses the VM because it is running the unmodified source code. The plugin must always update source code + breakpoints atomically.

I agree this is unexpected. The plugin should not push breakpoint updates until the developer pushes code changes to target (i.e., when the developer hits reload or restart) -- I believe this is #305.

EXPECTED: Program stops at breakpoint in the original, unedited source code. This source code is known to the vm and is available through the vm service.

I am not convinced this is expected. I think it would be perfectly find to have the program stop at counter++ still showing the comment lines that were added above.

@mit-mit mit-mit added this to the On Deck milestone Nov 22, 2016
@mit-mit mit-mit modified the milestones: 0.1.8, On Deck Dec 13, 2016
@devoncarew devoncarew modified the milestones: On Deck, 0.1.8 Dec 13, 2016
@pq
Copy link
Contributor

pq commented Mar 10, 2017

@skybrian : while you're looking at debugging in general, could you take a poke at this updating the status of this one?

@skybrian skybrian self-assigned this Mar 10, 2017
@skybrian
Copy link
Contributor

This is looking tricky. IDEA doesn't do this for other languages and the debugger code isn't entirely under our control - it's split between the Flutter plugin, Dart plugin, and the IDEA framework. So we're probably going to put this off.

Instead, I think we should show some kind of warning when the code is out of date, maybe with a button for the user to hot reload. (Not sure about the UI, though.)

@johnmccutchan
Copy link

@skybrian Can you please document your findings and recommendation and then we can discuss it at tomorrow's devtools meeting?

@skybrian
Copy link
Contributor

Sure. I don't see this meeting on my calendar. Could you send me an invite?

@johnmccutchan
Copy link

@skybrian You've been invited.

@devoncarew devoncarew modified the milestones: On Deck, Backlog May 22, 2017
@skybrian skybrian removed their assignment Jun 28, 2017
@skybrian
Copy link
Contributor

I don't believe anything has changed. As I'll be on leave, unassigning for triage.

@stevemessick
Copy link
Member

Closing this since it now works as it should: stops at the breakpoint in the edited code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants