Skip to content

Launching a new app in VSCode fails quickly with no error in VS Code insiders #5183

@natebot13

Description

@natebot13

Describe the bug
Attempting to launch either an old app or a freshly generated new app using VSCode's "Run" option briefly shows the debugger controls, then stops. I've checked extension outputs and vscode's developer console for errors, but nothing reveals any insight. When running from command line with "flutter run", the app launches successfully.

To Reproduce

  1. Start with a clean checkout of flutter stable (version and system info below)
  2. Generate a fresh app
  3. Use VSCode to try running it
  4. Observe it doesn't launch

Hints
I've found that adding the setting "dart.useLegacyDebugAdapters": true to my project allows it to be successfully launched by vscode. I assume it's related to something failing with using the non-legacy debug adapter. If I could find some logs for that, I'm sure the issue might be clearer.

Workspace Environment
Dart Code extension: 3.92.0
Flutter extension: 3.93.20240702 (activated)

App: Visual Studio Code - Insiders
App Host: desktop
Version: win 1.92.0-insider

Workspace type: Flutter (LSP)

Dart (3.4.3): C:\src\flutter\bin\cache\dart-sdk
Flutter (3.22.2): C:\src\flutter (Windows (windows-x64/windows))

Output from 'dart info'

C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe 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.4.3 (stable) (Tue Jun 4 19:51:39 2024 +0000) on "windows_x64"
  • on windows / "Windows 10 Pro" 10.0 (Build 22635)
  • locale is en-US

Project info

  • sdk constraint: '>=2.15.0 <3.0.0'
  • dependencies: bloc, flutter, flutter_bloc, flutter_highlight, flutter_localizations, google_fonts, highlighter, intl, json_annotation, protobuf, rive
  • dev_dependencies: build_runner, flutter_test, json_serializable, pedantic, protoc_builder

Process info

Memory CPU Elapsed time Command line
111 MB -- dart.exe
626 MB -- dart.exe
103 MB -- dart.exe
103 MB -- dart.exe
95 MB -- dart.exe
Output from 'flutter doctor'

C:\src\flutter\bin\flutter.bat doctor -v

[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22635.3930], locale en-US)
    • Flutter version 3.22.2 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (6 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc3)
    • Android SDK at C:\Users\tekkb\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0-rc3
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33213.308
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.92.0-insider)
    • VS Code at C:\Users\tekkb\AppData\Local\Programs\Microsoft VS Code Insiders
    • Flutter extension version 3.92.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22635.3930]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 126.0.6478.127
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 127.0.2651.49

[√] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    importantSomething important!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