You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Debugger has races and can show "Paused on Entry" shown for continued threads #280933
This came up before in #238591 and it was fixed, however I had the same issue reported again this week and have managed to repro again in mock debug (I think the timing is just slightly different to trigger this).
// Start additional threads, pause on entry, continue.conststartThread=2,endThread=12;for(vari=startThread;i<=endThread;i++){this._threads.push(newThread(i,`Thread ${i}`));this.sendEvent(newThreadEvent('started',i));this.sendEvent(newOutputEvent(`Thread ${i} started\n`));}awaitthis.delay(1);for(vari=startThread;i<=endThread;i++){this.sendEvent(newStoppedEvent('entry',i));this.sendEvent(newOutputEvent(`Thread ${i} stopped on entry\n`));}awaitthis.delay(1);for(vari=endThread;i>=startThread;i--){this.sendEvent(newContinuedEvent(i,false));this.sendEvent(newOutputEvent(`Thread ${i} continued\n`));}
Open and run the mock debug extension, open a markdown file, press F5. You will sometimes see the following (it's timing dependent, and sometimes it works fine):
Note: I do not believe it's related (since it still wouldn't add up), but the StoppedEvent in the debug library used here does not appear to support setting allThreadsStopped (which in the actual debug adapter where I'm hitting this issue I set to false). Even if that was being set to true here, since we stop all threads before resuming all threads, the result is the same - every thread is resumed at the end, yet the UI often shows many threads paused.
I've been experiencing the same problem on iOS and macOS for over a year a I think, the problem doesn't occur on Android for me though. Not sure if it's related to Dart-Code/Dart-Code#5397.
I'll include 4 screenshots of what I see in VS Code on my Mac when running on the iOS Simulator, and 1 screenshot of the (correct) UI I see when running on the Android Emulator.
Anthony Moretti (@anthonymoretti) the issue is a race that depends on specific timing. The timing of the threads starting on different platforms varies a bit, which is probably why it triggers on one platform and not others.
That issue was also a VS Code bug that was fixed in #265755. My feeling is that this is a similar issue (a different race, but with the same outcome that the local model of threads in VS Code becomes incorrect).
Activity
anthonymoretti commentedon Feb 16, 2026
I've been experiencing the same problem on iOS and macOS for over a year a I think, the problem doesn't occur on Android for me though. Not sure if it's related to Dart-Code/Dart-Code#5397.
I'll include 4 screenshots of what I see in VS Code on my Mac when running on the iOS Simulator, and 1 screenshot of the (correct) UI I see when running on the Android Emulator.
iOS Simulator screenshots:
Android Emulator screenshot:
--
iOS - 1. After I click "Start Debugging"
iOS - 2. When isolates have started
iOS - 3. When isolates have finished
iOS - 4. After I click "Continue"
Android - When isolates have started (correct)
DanTup commentedon Feb 17, 2026
Anthony Moretti (@anthonymoretti) the issue is a race that depends on specific timing. The timing of the threads starting on different platforms varies a bit, which is probably why it triggers on one platform and not others.
That issue was also a VS Code bug that was fixed in #265755. My feeling is that this is a similar issue (a different race, but with the same outcome that the local model of threads in VS Code becomes incorrect).