-
Notifications
You must be signed in to change notification settings - Fork 300
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
Debug sessions often terminate during a hot restart after upgrading to VS Code 1.66 for projects using Isolates #3916
Comments
I'm not able to reproduce this, but can you confirm:
Could you also capture some logs:
Ensure there's nothing sensitive in the log, then save and attach it here, or send to me at logs@dartcode.org. Thanks! |
OS: MacOS Monterey 12.0.1 (Apple M1 Pro) Ps. Downgrade VSCode to 1.65.2 works fine |
Thanks - I can't see an obvious reason for the disconnect, but just before it happens we did send two requests to remove the same breakpoint from the same isolate:
The second request fails, which might have led to the failure. I'm not sure why these two requests were sent though. Are you able to isolate a small repro project that triggers the issue you could share? (For example duplicating your project and removing anything sensitive until you have something you can share, or you find the trigger for the issue)? Failing that, a complete debugging log file (started before you launched the debug session) may help, I might be able to piece it together from that (it will get quite large though.. and it may include things from your project, like path/class names, and any evaluated expressions in the session). |
I had exact issue as @max-insight and after reading @DanTup comment about releasing twice (or more) times same breakpoint I just removed them all (some where even from non existent files) and it started to work - after 10 hot reloads connection is still working. Then I added one valid breakpoint in valid file, first hot reload worked, however second didn't. Dart-Code-Log-2022-03-05 12-10-58.txt
|
Add reproducible repository for reference. I can't sure it's reliable. Steps to reproduce
Expected behaviorDebugger connection shouldn't be closed. Actual behaviorDebugger connection is closed, I'm not sure this is reliably reproducible. |
Thanks! I'm not sure what's different, but I was just able to repro this using your project above on iPhone Simulator, and I see the same duplicate calls to remove breakpoints in the log.. I'll see what I can find. Thanks! |
Perhaps related:
I think previously if there was an unhandled exception in the Node VM, it would just report it, but with a warning that in future it would cause the VM to terminate. I wonder if this bug existed all along, but was silent, and now it's terminating the debug adapter. Edit: Looks like this change was included in Node 15, and VS Code's release notes say this version went to Node 16, so that seems likely. |
I think the reason I couldn't previously reproduce this is that it relies on having multiple isolates. I'm pushing a release that has a temporary fix (that is, to restore the previous Node JS behaviour of not terminating on unhandled promises), and have opened #3918 to address the underlying cause (unhandled promise rejections and duplicate attempts to remove breakpoints). |
I've published v3.38.2 (stable) and v3.39.20220408 (pre-release) of the Dart extension to fix this issue (there's no update to the Flutter extension). Please let me know if you're still seeing issues after updating to one of those versions (and reloading). Thanks! |
@furkanvatandas I suspect you're seeing dart-lang/webdev#1557. There was a change in Chrome v100 that has affected dwds (a component used by Flutter to emulate the Dart VM for web). A fix is being worked on dwds/Flutter. |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
debug session should not disconnect, should work as previously
Versions (please complete the following information):
here the link to issue raised in vscode repo: microsoft/vscode#146448
The text was updated successfully, but these errors were encountered: