question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugger sometimes get stuck in "running" state even though it's paused

See original GitHub issue

Moving from https://github.com/dart-lang/sdk/issues/40725.

If you run this:

void main() {
  var steps = 0;
  while (true) {
    steps++; // Breakpoint here
    print('Has run $steps steps');
  }
}

Then keep pressing F5, you’ll quickly end up in a state where VS Code thinks the app is running (it has a Pause button) but it is stopped at the breakpoint.

The issue seems to be that we process the response to the resume command sent to the VM after the PauseBreakpoint event, resulting in the UI being left in the “running” state when it’s actually paused.

Screenshot 2020-03-02 at 16 26 40

The events in the log are in the correct order (suggesting they came from the VM in the correct order):

Screenshot 2020-03-02 at 16 26 50

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
shyndmancommented, Mar 3, 2020

So far so good 😃

0reactions
shyndmancommented, Mar 2, 2020

Amazing! I’ll use it for the day and report back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Paused in debugger in chrome?
One possible cause, it that you've enabled the "pause on exceptions" (the little stop-sign shaped icon with the pause (||) symbol within in...
Read more >
Troubleshoot Breakpoints in the Visual Studio Debugger
Go to the Modules window (Debug > Windows > Modules) and check whether your module is loaded. If your module is loaded, check...
Read more >
Java: slow performance or hangups when starting ...
Java: slow performance or hangups when starting debugger and stepping Follow. Debugger performance can be affected by the following: Method ...
Read more >
148249 – When Stepping, Debugger Loses State. Must ... - Bugs
1. Debug one thread, pressing F6 to advance and F5 for stepping into, sometimes makes the debugger loose its state. pressing F6 won't...
Read more >
In debug, Eclipse cannot pause after a particular ...
The short answer is that you probably have either a deadlock or race condition in your code. Those are some of the most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found