Repository navigation
Isolates appear as "paused on entry" even if they're not paused #5397
Description
Describe the bug
When spawning new isolates at the start of an application, these isolates are mistakenly viewed as "paused on entry" in the call stack of the debugging view.
import 'dart:async';
import 'dart:isolate';
void main() async {
final isolates = <Isolate>[];
for (var i = 0; i < 10; i++) {
isolates.add(await Isolate.spawn(
(_) {
print('isolate $i started');
Timer.periodic(const Duration(minutes: 10), (_) {});
},
null,
));
}
await Future.delayed(Duration(seconds: 2));
print('at resumed state');
Timer.periodic(const Duration(minutes: 10), (_) {});
}Setting a breakpoint on the print in line 18 and running this Dart program in VS Code will show most isolates as "paused on entry" (usually all of them, but not always. Maybe this is a race condition?).
Unfortunately, this is not just a cosmetic issue. It also affects the pause button in the button bar of the debugger, which will now interact with the new isolates instead of pausing / resuming the main isolate like it usually would.
Expected behavior
The isolates (except for main paused on a breakpoint) are all running and should be displayed as such.
I've attached a VM service to print the isolate's state shortly after hitting the breakpoint, the isolates are listed as running there. So I think this may be an issue in the extension (as opposed to something in the vm service).
Screenshots
Immediately after program start, all secondary isolates are shown as "Paused on entry". Then afterwards they're showing up as "".
Please complete the following information:
Workspace Environment
Dart Code extension: 3.102.0
Flutter extension: 3.102.0 (not activated)
App: Visual Studio Code
App Host: desktop
Version: mac 1.96.3
Workspace type: Dart (LSP)
Workspace name: vscode_startup_issue
Dart (3.6.1): /opt/homebrew/Cellar/dart/3.6.1/libexec
Flutter (3.27.2): /Users/simon/fvm/versions/stable (No device)
Output from 'dart info'
/opt/homebrew/Cellar/dart/3.6.1/libexec/bin/dart info
If providing this information as part of reporting a bug, please review the information
below to ensure it only contains things you're comfortable posting publicly.
General info
- Dart 3.6.1 (stable) (Tue Jan 7 09:50:00 2025 -0800) on "macos_arm64"
- on macos / Version 15.2 (Build 24C101)
- locale is de-DE
Project info
- sdk constraint: '^3.6.1'
- dependencies: sqlite_async, vm_service
- dev_dependencies: lints, test
Process info
| Memory | CPU | Elapsed time | Command line |
|---|---|---|---|
| 116 MB | 0.0% | 22:01 | dart devtools |
| 30 MB | 0.0% | 38:41 | dart devtools --machine --allow-embedding --dtd-uri ws:/szh7dcqvfD8= |
| 231 MB | 0.0% | 38:42 | dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.102.0 |
| 581 MB | 0.0% | 30:56 | dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.102.0 |
| 33 MB | 0.0% | 38:42 | dart tooling-daemon --machine |
| 64 MB | 0.0% | 30:56 | dart tooling-daemon --machine |
| 72 MB | 0.0% | 38:42 | flutter_tools.snapshot daemon |

Activity
DanTup commentedon Jan 23, 2025
I don't seem to reproduce this, I see them all as paused on the breakpoint:
Could you try capturing debugging logs while reproducing this?
Thanks!
DanTup commentedon Jan 23, 2025
Sorry, I had my breakpoint on the wrong print :) I can repro.. investigating!
simolus3 commentedon Jan 23, 2025
Thanks for the quick response 👍 I now see that my description was also ambigious..
DanTup commentedon Jan 23, 2025
Hmmm, the DAP traffic looks good here:
dap.txt
If I filter to just the lines containing one of the threads, it looks like this:
So while it did pause-on-entry, it continues immediately after. I'll try to reproduce with VS Code's MockDebug, this could be a VS Code bug.
Repro for Dart-Code/Dart-Code#5397
DanTup commentedon Jan 23, 2025
I can reproduce this in MockDebug. I've filed microsoft/vscode#238591
11 remaining items
DanTup commentedon Sep 15, 2025
VS Code has made a fix for this and it's in the latest Insiders build. Is anyone that could reproduce this able to confirm that it's fixed there? (You'll need to ensure you're on the latest insiders and restart after it installs the update).
The only repro I had was from MockDebug so it's not the best test that this is solved.
simolus3 commentedon Sep 15, 2025
I can't reproduce this issue with the latest insider build and the snippet I've posted in the original issue description. Since it still reproduces for me on VS Code stable, it looks like the fix is working 👍
Should I close this issue or will that happen with the next release?
DanTup commentedon Sep 15, 2025
Great, thanks for confirming! I'll close this now.
easy-Coder commentedon Sep 21, 2025
@DanTup I still faced this issue by the way.
I'm using the latest flutter version. also latest VS code and Dart Code extension version as i just updated it.
DanTup commentedon Sep 22, 2025
@easy-Coder are you using VS Code stable or Insiders? Currently the fix is only in Insiders (see my comments a few above). Usually VS Code releases around 1 week into each month, so I would expect the fix to be in stable in around a fortnight.
easy-Coder commentedon Sep 23, 2025
@DanTup I'm using the stable version. I will wait for the update. Thank you for your response
NBA2K1 commentedon Nov 29, 2025
I'm experiencing this bug right now.
VSCodium:
Dart Extension:
DanTup commentedon Nov 29, 2025
@NBA2K1 could you provide a code sample that reproduces this, along with a log file captured following the instructions in this comment above? Thanks!
NBA2K1 commentedon Dec 11, 2025
I can reproduce it with the same code sample as above.
&nbps;
Here's my log file:
Dart-Code-Log-2025-11-04 02-44-55.txt
DanTup commentedon Dec 11, 2025
@NBA2K1 thanks! A similar issue also came up at #5829 and while debugging that I reproduced what I think is the issue you see here - it appears to be the same VS Code bug again.
I've opened microsoft/vscode#280933 with a repro of that issue using their Mock Debug package - please add 👍 to that issue.
But it turns out there is also another issue (which is what #5829 really was about) where isolates can hang at startup. That issue is still being investigated.
Thanks!