Dart-Code: Cannot launch from VS code but can launch from CLI because CocoaPods is not found

Attempting to run DevTools on the macos target from VS code: Launch config:

        {
            "name": "devtools",
            "request": "launch",
            "type": "dart",
            "program": "devtools_app/lib/main.dart",
        },
Launching lib/main.dart on macOS in debug mode...
main.dart:1
Warning: CocoaPods not installed. Skipping pod install.
  CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
  Without CocoaPods, plugins will not work on iOS or macOS.
  For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

Exception: CocoaPods not installed or not in valid state.
Exited

App runs successfully from CLI

flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
Running pod install...                                           2,839ms
Building macOS application...
flutter: DevTools version 2.22.2-dev.2.
Syncing files to device macOS...                                   321ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

An Observatory debugger and profiler on macOS is available at:
http://127.0.0.1:57411/V8S16NafUMk=/
The Flutter DevTools debugger and profiler on macOS is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:57411/V8S16NafUMk=/

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 33 (14 by maintainers)

Most upvoted comments

@yeikel16 could you open a new issue - I think this is a different cause. Can you also include both the full output of running flutter doctor -v in a terminal where it works, and the output of running the Flutter: Run Flutter Doctor command from the VS Code command palette (not the built-in terminal).

Thanks!