Skip to content
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 Restart button causes selected debug session to restart to the top one when debugging multiple sessions #3475

Closed
scortumee opened this issue Jul 15, 2021 · 5 comments
Labels
upstream in vs code / lsp / dap Needs changing in VS Code, LSP or DAP protocols/libraries

Comments

@scortumee
Copy link

Describe the bug
I have been debugging multiple devices(ios and android) for my flutter project.
Let's say I have started the devices in following order iphone7 -> iphone8 -> android1
When I restart device android1, the dropdown menu which shows device name switches to iPhone 7 (the first device which was run) and causes errors for other devices.

To Reproduce
Steps to reproduce the behavior:

  1. Run multiple devices: one android and one ios devices
  2. Choose one of them and hit the restart button

Expected behavior
When I hit the restart button on iphone7 device, it should stay on iphone7

Screenshots
If applicable, add screenshots to help explain your problem.
https://user-images.githubusercontent.com/18318832/125732125-28429cfe-4afd-4265-a77f-53c2ab7f41a3.mov

Versions (please complete the following information):

  • VS Code version: 1.58.1
  • Dart extension version: v3.24.2
  • Dart/Flutter SDK version: v3.24.0
@DanTup
Copy link
Member

DanTup commented Jul 15, 2021

Thanks for the report! I can reproduce this but it seems to be a VS Code issue. I've filed an issue at microsoft/vscode#128744 using MockDebug to repro.

@DanTup DanTup added upstream in vs code / lsp / dap Needs changing in VS Code, LSP or DAP protocols/libraries and removed is bug labels Jul 15, 2021
@DanTup DanTup closed this as completed Jul 15, 2021
@DanTup
Copy link
Member

DanTup commented Jul 15, 2021

and causes errors for other devices

I missed this bit. I can't reproduce that - I don't see any errors for other devices when I restart. If you can reproduce that, please file another issue and include specific details of the errors you're seeing during a restart (it will be unrelated to the resetting debug session drop-down). Thanks!

@DanTup DanTup changed the title Restart button does not work properly while debugging multiple devices (ios and android) Debug Restart button causes selected debug session to restart to the top one when debugging multiple sessions Jul 15, 2021
@scortumee
Copy link
Author

scortumee commented Jul 16, 2021

Thank you @DanTup for creating an issue on vscode thread. I appreciate it

The error occured for a specific package google_maps_flutter: ^2.0.6
You can reproduce in a following way:

  • install google_maps_flutter package in a flutter project and have google map widget as a first screen
  • run a session on an android device and then ios device
  • hit restart button on android device session
    then StateError (Bad state: Future already completed) error will pop up on the ios device session
    inside onPlatformViewCreated function

Screen Shot 2021-07-16 at 12 21 18 AM

I have never experienced this error till recent update of either vscode or flutter extension
The above error does not occur when I am running multiple ios only devices. But restarting to the top one session still occurs.

I would really appreciate if you take a look at it.

@DanTup
Copy link
Member

DanTup commented Jul 19, 2021

@scortumee could you make a small repro project and file a new issue? I suspect it's a Flutter or Google Maps issue, but I'm happy to try to repro it if you can supply a repro set up that definitely triggers it for you. Thanks!

@scortumee
Copy link
Author

@DanTup Recent update of Visual Studio Code (v1.59.0) fixed the issue. It was nothing to do with Flutter or Google Maps.
Thanks for filing an issue and taking care of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream in vs code / lsp / dap Needs changing in VS Code, LSP or DAP protocols/libraries
Projects
None yet
Development

No branches or pull requests

2 participants