flutterwebassembly

How to attach the debugger for Flutter Web WASM?


I'm trying to debug a Flutter Web app compiled in WASM mode, but the debugger (DevTools) won’t attach; WebStorm keeps showing Waiting for debug connection... indefinitely.

For context, I'm compiling and running the app by clicking this option in WebStorm:

enter image description here

Console output:

Launching lib/main.dart on Chrome in debug mode...
Compiling lib/main.dart for the Web...
✓ Built build/web

Attach args:

--wasm
--dart-define="URL=http://localhost:3000/"

Flutter doctor:

[✓] Flutter (Channel stable, 3.38.3, on Ubuntu 24.04.3 LTS 6.8.0-87-generic, locale en_US.UTF-8) [25ms]
    • Flutter version 3.38.3 on channel stable at /home/rodrigo/Documents/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 19074d12f7 (5 days ago), 2025-11-20 17:53:13 -0500
    • Engine revision 13e658725d
    • Dart version 3.10.1
    • DevTools version 2.51.1
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging

[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0) [149ms]
    • Android SDK at /home/rodrigo/Android/Sdk
    • Emulator version 35.6.11.0 (build_id 13610412) (CL:N/A)
    ✗ cmdline-tools component is missing.
      Try installing or updating Android Studio.
      Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure to set the ANDROID_HOME environment variable.
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/linux-android-setup for more details.

[✓] Chrome - develop for the web [6ms]
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop [231ms]
    • Ubuntu clang version 18.1.3 (1ubuntu1)
    • cmake version 3.28.3
    • ninja version 1.11.1
    • pkg-config version 1.8.1
    • OpenGL core renderer: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 20.1.2, DRM 3.57, 6.8.0-87-generic) (X11)
    • OpenGL core version: 4.6 (Core Profile) Mesa 25.0.7-0ubuntu0.24.04.2 (X11)
    • OpenGL core shading language version: 4.60 (X11)
    • OpenGL ES renderer: AMD Radeon Graphics (radeonsi, raphael_mendocino, LLVM 20.1.2, DRM 3.57, 6.8.0-87-generic) (X11)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 25.0.7-0ubuntu0.24.04.2 (X11)
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
    • GL_EXT_framebuffer_blit: yes (X11)
    • GL_EXT_texture_format_BGRA8888: yes (X11)

[✓] Connected device (2 available) [76ms]
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 24.04.3 LTS 6.8.0-87-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 142.0.7444.162

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

! Doctor found issues in 1 category.

Solution

  • There's an issue about it on Flutter's GitHub: https://github.com/flutter/flutter/issues/179156