Skip to content

Debugger stuck on waiting for connection from debug service on chrome when trying to run on web using Flutter 2.x #4370

Closed

Description

@felipefranca824

Describe the bug
Debugger stuck on waiting for connection from debug service on chrome when trying to run on web

To Reproduce
Steps to reproduce the behavior:

  1. having a flutter project with an older version 2.10.5 for example
  2. click on debug
    image

Expected behavior
project was supposed to run normally

Screenshots
image

Please complete the following information:

  • Operating System and version: Ubuntu 22.04.1 LTS
  • VS Code version: 1.74.3
  • Dart extension version: 3.58.0
  • Dart/Flutter SDK version: 2.16.2/2.10.5
  • Target device (if the issue relates to Flutter debugging): chrome

Activity

  1. DanTup commented on Feb 1, 2023

    @DanTup
    Member

    @felipefranca824 from the error in your screenshot, it looks like there is a problem with the code (trying to use ?? after a non-nullable variable).

    Does fixing that issue resolved the problem?

    If not, can you produce a small sample project that triggers this issue that you can share? Thanks!

  2. added
    awaiting infoRequires more information from the customer to progress
    on Feb 1, 2023
  3. felipefranca824 commented on Feb 2, 2023

    @felipefranca824
    Author

    @DanTup
    Reproduced in a new project
    image
    doesn't come out of it.

    but if i run by command line "fllutter run -d chome" it works

  4. DanTup commented on Feb 2, 2023

    @DanTup
    Member

    @felipefranca824 can you reproduce this reliably?

    Did you make any changes to the sample project, or run it as is (and how did you start it?).

    Could you try capturing debugging logs while reproducing it (using the sample project)?

    • Run the Dart: Capture Debugging Logs command
    • Run the project to reproduce the issue
    • Wait at least 30s after Chrome appears, just to ensure the log isn't cut short of anything that might be running slowly
    • Click Cancel on the logging notification to stop logging and open the log
    • Remove anything sensitive from the log
    • Attach the log here, in a gist, or email to me at [email protected].

    Thanks!

  5. felipefranca824 commented on Feb 2, 2023

    @felipefranca824
    Author

    @DanTup
    I ran the project without any modifications.

    I sent the log file to your email

  6. DanTup commented on Feb 2, 2023

    @DanTup
    Member

    @felipefranca824 thanks! I found the issue in your log:

    setIsolatePauseMode: NoSuchMethodError: Class 'ChromeProxyService' has no instance method 'setIsolatePauseMode' with matching arguments.
    Receiver: Instance of 'ChromeProxyService'
    Tried calling: setIsolatePauseMode(\"1\", exceptionPauseMode: \"Unhandled\", shouldPauseOnExit: null)
    Found: setIsolatePauseMode(String, {String exceptionPauseMode, bool shouldPauseOnExit}) => Future<Success>
    

    This was a bug in earlier versions of Flutter (dart-lang/webdev#1627). It's since been fixed but you'll need to upgrade Flutter to a more recent version to get the fix (the current version is 3.7).

    The reason it works from the command line is that this doesn't set up the debugger, which avoids the code that is failing.

    Please let me know if you still have the issue after upgrading!

  7. felipefranca824 commented on Feb 2, 2023

    @felipefranca824
    Author

    After updating the problem was solved.

    to continue using in older versions of flutter I used version 3.56.0 of the dartcode extension.

    thanks

  8. DanTup commented on Feb 7, 2023

    @DanTup
    Member

    to continue using in older versions of flutter I used version 3.56.0 of the dartcode extension.

    Oh, I see what's happened here. The new version of the extension is using a new version of the API, but there's a mismatch between the VM Service version that supports this in DWDS (web) versus the standard VM.

    This is unfortunate, although since the latest stable versions of everything are working (and using the previous extension works around the issue) I think it's probably not worth trying to find a way to handle this for now. If it turns out the issue is widespread, we can re-visit this.

    Thanks!

  9. psimondk commented on Feb 11, 2023

    @psimondk

    I'm getting this issue revisiting a flutter web project there hasn't been touched for 7 months - so very likely one of the latest dart extension upgrades is the culprit - its very annoying and i do not really wanna do a 2.x 3.x upgrade as we're close to go-live for a large client

  10. DanTup commented on Feb 13, 2023

    @DanTup
    Member

    @psimondk the quickest fix would be rolling back the Dart extension to v3.56:

    Screenshot 2023-02-13 at 11 29 12

    I'll have a look to see whether there's a version we can gate on that avoids this issue for both web/non-web.

  11. changed the title [-]Debugger stuck on waiting for connection from debug service on chrome when trying to run on web[/-] [+]Debugger stuck on waiting for connection from debug service on chrome when trying to run on web using Flutter 2.x[/+] on Feb 13, 2023
  12. reopened this on Feb 13, 2023
  13. added
    in debuggingRelates to the debug adapter or process of running debug sessions
    and removed on Feb 13, 2023
  14. added this to the v3.60.0 milestone on Feb 13, 2023
  15. DanTup commented on Feb 13, 2023

    @DanTup
    Member

    I've updated the version for when the extension start using the new API to something I believe works for both cases. If you switch to the Pre-release channel for the extension, you'll get this fix now without needing to use an older version of the extension:

    Screenshot 2023-02-13 at 12 19 54

    You can switch back to the stable versions of the extension after the next release (or, stick with this - it should generally be stable anyway, as it's usually only published to make fixes like this available to people a little sooner).

  16. psimondk commented on Feb 19, 2023

    @psimondk
  17. pinned this issue on Feb 20, 2023
  18. lbevilacqua commented on Feb 22, 2023

    @lbevilacqua

    Hello,

    I encountered the issue too on a Flutter 2.10.5 project.
    Using the Dart extension pre-release version solved it.

    Thanks

  19. unpinned this issue on Mar 22, 2023
  20. sperochon commented on Apr 20, 2023

    @sperochon

    Hello,

    If it can help someone...

    I had the same issue on a Flutter 2.10 project using Android Studio and Flutter plugin (version 73).
    As suggested by previous comments, I have installed previous release of Flutter plugin (version 72) manually and it is now working fine.

    Here are the steps :

    1. I have downloaded the zip plugin file here (be careful to select "compatibility" to "Android Studio"):
      https://plugins.jetbrains.com/plugin/9212-flutter/versions/stable

    2. Then installed the file manually as described here :
      https://stackoverflow.com/a/17358862/1836827

    And it works :-)

  21. added a commit that references this issue on Sep 2, 2025
    aeea8df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsis bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions