Skip to content

Attempting to open DevTools pages when using Wasm results in "debug session is not ready" instead of a message about not being supported #6178

Closed

Description

@JamesHancockAtteria

Describe the bug
Related to this: #4987

If you run a vs code debug session with wasm enabled, the session starts, but then the flutter side bar never sees that running session, debug console doesn't see the logs either, they dump to Chrome console only.

        {
            "name": "Debug Chrome",
            "request": "launch",
            "type": "dart",
            "flutterMode": "debug",
            "program": "lib/main.dev.dart",
            "openDevTools": "logging",
            "args": [
                "-d",
                "chrome",
                "--web-port",
                "16503",
                "--wasm",
                "--web-enable-expression-evaluation"
            ]
        },

This works fine on the macos, ios and android heads to name 3 others. Just web has an issue.

To Reproduce
Steps to reproduce the behavior:

  1. Start a web debug session in vs code iwth the above launch configuration.
  2. Click onto the flutter side bar
  3. Click logging
  4. Error comes up as a notification tooltip.

Expected behavior
Should work and show me the logs.

Please complete the following information:

**!! ⚠️ PLEASE REVIEW THIS REPORT FOR SENSITIVE INFORMATION BEFORE SHARING ⚠️ !!**

<details>

<summary><strong>Workspace Environment</strong></summary>

```text
Dart Code extension: 3.142.0
Flutter extension: 3.142.0 (activated)

App: Visual Studio Code
App Host: desktop
Version: mac 1.136.2

Workspace type: Dart, Flutter (LSP) (Multiroot)
Workspace name: scribe (Workspace)

Dart (3.13.1): /Users/username/flutter/bin/cache/dart-sdk
Flutter (3.47.1): /Users/username/flutter (Chrome (web-javascript/web))

Output from 'dart info'

/Users/username/flutter/bin/cache/dart-sdk/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.13.2 (stable) (Tue Aug 25 01:01:12 2026 -0700) on "macos_arm64"
  • on macos / Version 26.6.2 (Build 25G83)
  • locale is en-US

Project info

  • sdk constraint: '>=3.13.1 <4.0.0'
  • dependencies: app_badge_plus, audio_session, auto_size_text, collection, cronet_http, crypto, darq, date_field, device_info_plus, dio, dotted_line, dynamic_tabbar, easy_localization, encrypt_shared_preferences, equatable, file_picker, firebase_core, firebase_messaging, flutter, flutter_localizations, flutter_native_splash, flutter_secure_storage, flutter_soloud, flutter_svg, flutter_typeahead, flutter_web_plugins, go_router, google_fonts, hive_ce, hive_ce_flutter, http, image, image_picker, intl, ispect, logging, mask_text_input_formatter, material_ui, mime, multi_dropdown, odata_query, openidconnect, path_provider, provider, record, share_plus, signalr_hub, url_launcher, uuid, very_good_infinite_list, web
  • dev_dependencies: analyzer, build_runner, build_verify, change_app_package_name, flutter_cors, flutter_launcher_icons, flutter_lints, flutter_test, go_router_builder, hive_ce_generator, integration_test, launcher_name, mocktail
  • elided dependencies: 2

Process info

Memory CPU Elapsed time Command line
11 MB 0.0% 01-21:14:10 build_runner.dart-3.13.1.snapshot watch
11 MB 0.0% 01-21:14:04 build_runner.dart-3.13.1.snapshot watch
11 MB 0.0% 01-21:13:39 build_runner.dart-3.13.1.snapshot watch
12 MB 0.0% 01-21:13:52 build_runner.dart-3.13.1.snapshot watch --delete-conflicting-outputs
18 MB 0.0% 06-19:08:09 dart development-service --vm-service-uri=http:/ --bind-address=127.0.0.1 --bind-port=50120 --serve-devtools --app-name=Kind: Flutter - Device: Pixel Tablet - Package: example
14 MB 0.0% 07-03:34:59 dart devtools --machine --allow-embedding
12 MB 0.0% 01-21:13:35 dart devtools --machine --allow-embedding --dtd-uri ws:/8CTUvgu9S3A=
12 MB 0.0% 01-20:44:28 dart devtools --machine --allow-embedding --dtd-uri ws:/Ai-_WDY-glY=
19 MB 0.0% 03:27:51 dart devtools --machine --allow-embedding --dtd-uri ws:/bY2nWELd9nQ=
11 MB 0.0% 07-03:34:55 dart devtools --machine --allow-embedding --dtd-uri ws:/hs0u4vV6U7E=
12 MB 0.0% 01-21:12:43 dart devtools --machine --allow-embedding --dtd-uri ws:/l__kxNHcj4A=
12 MB 0.0% 01-21:13:31 dart devtools --machine --allow-embedding --dtd-uri ws:/x5Vfmmu7Lpg=
17 MB 0.0% 01-21:13:25 dart devtools --machine --allow-embedding --dtd-uri ws:/yuYP0eY1yBE=
20 MB 0.0% 01-21:13:35 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.142.0
36 MB 0.0% 03:28:00 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.142.0
19 MB 0.0% 01-20:44:29 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.142.0
1447 MB 0.0% 01-21:13:29 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.142.0
22 MB 0.0% 01-21:13:40 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.142.0
21 MB 0.0% 01-21:13:38 dart language-server --protocol=lsp --client-id=VS-Code --client-version=3.142.0
12 MB 0.0% 01-20:42:14 dart mcp-server
11 MB 0.0% 06-21:57:58 dart mcp-server --exclude-tool analyze_files --exclude-tool dart_fix --exclude-tool dart_format --exclude-tool run_tests
19 MB 0.0% 01-02:51:41 dart mcp-server --exclude-tool analyze_files --exclude-tool dart_fix --exclude-tool dart_format --exclude-tool run_tests
19 MB 0.0% 01-20:30:43 dart pub global run flutter_agent_lens:main
13 MB 0.0% 01-21:13:40 dart tooling-daemon --machine
17 MB 0.0% 01-21:13:29 dart tooling-daemon --machine
14 MB 0.0% 01-21:13:38 dart tooling-daemon --machine
14 MB 0.0% 01-21:13:35 dart tooling-daemon --machine
14 MB 0.0% 01-20:44:29 dart tooling-daemon --machine
20 MB 0.0% 03:28:00 dart tooling-daemon --machine
13 MB 0.0% 01-20:42:14 dartvm --resolved_executable_name=/dart --executable_name=/dart bin/server.dart
12 MB 0.0% 06-02:24:00 flutter_skill.dart-3.13.1.snapshot server
16 MB 0.0% 06-20:27:47 flutter_skill.dart-3.13.1.snapshot server
13 MB 0.0% 01-21:07:10 flutter_skill.dart-3.13.1.snapshot server
57 MB 0.1% 01-21:13:38 flutter_tools.snapshot daemon
57 MB 0.1% 01-21:13:40 flutter_tools.snapshot daemon
59 MB 0.1% 01-21:13:29 flutter_tools.snapshot daemon
81 MB 0.3% 03:28:00 flutter_tools.snapshot daemon
59 MB 0.3% 01-20:44:29 flutter_tools.snapshot daemon
58 MB 0.1% 01-21:13:35 flutter_tools.snapshot daemon
46 MB 0.0% 23:13 flutter_tools.snapshot debug_adapter
100 MB 0.0% 23:13 flutter_tools.snapshot run --machine --start-paused -d chrome --devtools-server-address http:/ --target /main.dev.dart -d chrome --web-port 16503 --wasm --dart-define=ISPECT_ENABLED=true --web-enable-expression-evaluation
11 MB 0.0% 01-20:42:14 main.dart-3.13.1.snapshot
11 MB 0.0% 01-21:07:10 main.dart-3.13.1.snapshot
51 MB 0.0% 02:15:14 main.dart-3.13.2.snapshot
13 MB 0.0% 01-20:30:39 main.dart-3.13.2.snapshot
Output from 'flutter doctor'

/Users/username/flutter/bin/flutter doctor -v

[✓] Flutter (Channel stable, 3.47.2, on macOS 26.6.2 25G83 darwin-arm64, locale en-US) [1,033ms]
    • Flutter version 3.47.2 on channel stable at /Users/username/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d3b14c8769 (2 weeks ago), 2026-08-26 16:07:51 -0700
    • Engine revision a804b26164
    • Dart version 3.13.2
    • DevTools version 2.60.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[!] Android toolchain - develop for Android devices (Android SDK version 37.0.0) [1,158ms]
    • Android SDK at /Users/username/Library/Android/sdk
    • Emulator version 37.1.11.0 (build_id 15917651) (CL:N/A)
    • Platform android-37.1, build-tools 37.0.0
    • ANDROID_HOME = /Users/username/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/username/Library/Android/sdk
    • Java binary at: /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.20.1+0)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 26.6) [1,729ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17F113
    • CocoaPods version 1.17.0

[✓] Chrome - develop for the web [7ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (7 available) [7.0s]
    • SM A176U1 (mobile)                 • R5GL63B3GWV                          • android-arm64  • Android 16 (API 36)
    • sdk gphone64 arm64 (mobile)        • emulator-5554                        • android-arm64  • Android 16 (API 36) (emulator)
    • Pixel Tablet (mobile)              • emulator-5556                        • android-arm64  • Android 15 (API 35) (emulator)
    • iPhone 17 (mobile)                 • 4A99E018-E415-496E-BE37-5BC143084B6B • ios            • com.apple.CoreSimulator.SimRuntime.iOS-26-5 (simulator)
    • macOS (desktop)                    • macos                                • darwin-arm64   • macOS 26.6.2 25G83 darwin-arm64
    • Chrome (web)                       • chrome                               • web-javascript • Google Chrome 152.0.7977.83    

[✓] Network resources [264ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

Activity

  1. added this to the v3.144.0 milestone on Sep 17, 2026
  2. DanTup commented on Sep 17, 2026

    @DanTup
    Member

    This happens because we don't get a VM Service URI when running in WASM, so Dart-Code just thinks the session has not finished starting up yet.

    @bkonyi do we support debugging/VM Service for WASM? If not, I should update Dart-Code to detect this and show a more useful message.

  3. added
    awaiting infoRequires more information from the customer to progress
    on Sep 17, 2026
  4. JamesHancockAtteria commented on Sep 17, 2026

    @JamesHancockAtteria
    Author

    If this isn't supported I would suggest that it needs to be because there are significant differences between the behaviors of wasm and not, so it's not optional to be able to debug it.

    So while the message might need updating in the short term, in the longish term this becomes vital. I would assume by this time next year basically all web deploys will be with wasm.

  5. DanTup commented on Sep 17, 2026

    @DanTup
    Member

    There are some other modes that don't support debugging (such as release/profile modes). If wasm is intended only as a release target, it might be that it's not intended to be debugged. However I'm not involved in the wasm work so I'm not sure of the plans.

    I found a recent issue from @kevmoo at flutter/flutter#190777 which I think describes this issue specifically:

    Currently, running flutter run --wasm without --release creates an ambiguous middle ground: it attempts a debug-style compilation without full DDC/DWDS debugging support

    So I think this issue is likely just a consequence of that. However it appears that even with --release we don't detect this correct, and provide the same misleading message.

    I'll fix this to ensure --wasm --release produces a suitable message and assume that --wasm without --release will stop working (as part of flutter/flutter#190777) or if it gains debuggability, this should just start working.

  6. removed
    awaiting infoRequires more information from the customer to progress
    on Sep 17, 2026
  7. changed the title [-]Using VS Code + Web head with WASM results in Flutter side bar tools failing with: This debug session is not ready yet.[/-] [+]Attempting to open DevTools pages when using Wasm results in "This debug session is not ready yet" instead of a message about not being supported[/+] on Sep 17, 2026
  8. changed the title [-]Attempting to open DevTools pages when using Wasm results in "This debug session is not ready yet" instead of a message about not being supported[/-] [+]Attempting to open DevTools pages when using Wasm results in "debug session is not ready" instead of a message about not being supported[/+] on Sep 17, 2026
  9. DanTup commented on Sep 17, 2026

    @DanTup
    Member

    I've pushed 2f8a491 which will improve the message here to instead say "DevTools is not available for an app built with Wasm".

    I've also opened flutter/flutter#192926 which updates the Flutter debug adapter to not expect a debugger connection when using WASM (and when --profile or --release are in args, instead of only checking toolargs), as this was preventing the flutter.appStarted event from ever arriving which meant Dart-Code though the session was still starting, even when it was not.

    If debugging / VM Service becomes supported for Wasm in future, we'll need to at least remove the additional --wasm check from the Flutter DAP (the change here is less important, as once we have a debugger, we'd never get to this code that shows the message).

  10. bkonyi commented on Sep 17, 2026

    @bkonyi

    @bkonyi do we support debugging/VM Service for WASM? If not, I should update Dart-Code to detect this and show a more useful message.

    Just confirming that we do not currently support debugging or any VM service functionality for WASM (although we are investigating it for the future).

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions