Skip to content

Detach when running Flutter tools on web exits the application instead of detaching it #163329

@srujzs

Description

@srujzs

Steps to reproduce

  1. Run a flutter app using flutter run -d chrome.
  2. Press 'd' on the keyboard.

Expected results

The process should end but the Chrome browser should stay alive.

Actual results

Chrome exits.

Code sample

Using the default counter app when creating a Flutter project should trigger this.

Screenshots or Video

Logs

Flutter Doctor output


Downloading Darwin arm64 Dart SDK from Flutter engine b37e7aaaabceda3d95750f45432b442e54b12584...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  197M  100  197M    0     0  54.2M      0  0:00:03  0:00:03 --:--:-- 54.2M
Building flutter tool...
Resolving dependencies...
Downloading packages...
Got dependencies.
Downloading package sky_engine...                                  205ms
Downloading package flutter_gpu...                                 140ms
Downloading flutter_patched_sdk tools...                           274ms
Downloading flutter_patched_sdk_product tools...                   257ms
Downloading darwin-arm64 tools...                                  946ms
Downloading darwin-arm64/font-subset tools...                      550ms
[!] Flutter (Channel main, 3.30.0-1.0.pre.103, on macOS 15.3 24D60 darwin-arm64, locale en) [2.2s]
    • Flutter version 3.30.0-1.0.pre.103 on channel main at /Users/srujzs/flutter/flutter
    ! Warning: `dart` on your path resolves to /Users/srujzs/dart-sdk/sdk/xcodebuild/ReleaseARM64/dart-sdk/bin/dart, which is not inside your current
      Flutter SDK checkout at /Users/srujzs/flutter/flutter. Consider adding /Users/srujzs/flutter/flutter/bin to the front of your path.
    • Upstream repository [email protected]:flutter/flutter.git
    • Framework revision b37e7aaaab (3 days ago), 2025-02-11 13:54:38 -0800
    • Engine revision b37e7aaaab
    • Dart version 3.8.0 (build 3.8.0-88.0.dev)
    • DevTools version 2.43.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and
      upgrades.

[✗] Android toolchain - develop for Android devices [1,328ms]
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[!] Xcode - develop for iOS and macOS (Xcode 14.3.1) [1,363ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    ! Flutter recommends a minimum Xcode version of 15.
      Download the latest version or update via the Mac App Store.
    ✗ CocoaPods not installed.
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      For installation instructions, see https://guides.cocoapods.org/using/getting-started.html#installation

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

[!] Android Studio (not installed) [6ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] VS Code (version 1.96.2) [6ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.104.0

[✓] Connected device (2 available) [5.6s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 15.3 24D60 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 133.0.6943.55

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

! Doctor found issues in 4 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectfound in release: 3.29Found to occur in 3.29found in release: 3.30Found to occur in 3.30has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions