flutter / flutter/flutter-intellij

[proposal] Provide a way to call `FlutterSdk.flutterRun` in non paused state

Open
#5,461 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

## Steps to Reproduce

I'm building a IntelliJ plugin which depends on this Flutter plugin to execute some Flutter commands. I'm using the `FlutterSdk.flutterRun` method to run the opened project and everything works fine. However I noticed that when I run on a device (Android, web or MacOS) in debug mode, the app is started in paused mode: it builds the app on the device, but I get a blank app (the Flutter UI is not rendered).

After some investigation I notice that the method I'm using is adding the `--start-paused` option automatically:

https://github.com/flutter/flutter-intellij/blob/f21250eaedeed48397c24cddef7d30c75ad19db1/src/io/flutter/sdk/FlutterSdk.java#L277-L279

## Proposal

Provide a way to prevent this flag of being passed automatically.

## Version info

flutter run -v

```console
[✓] Flutter (Channel stable, 2.0.6, on macOS 11.2.3 20D91 darwin-x64, locale en-AO)
• Flutter version 2.0.6 at /Users/pedromassango/Code/flutter_stable
• Framework revision 1d9032c7e1 (5 days ago), 2021-04-29 17:37:58 -0700
• Engine revision 05e680e202
• Dart version 2.12.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/pedromassango/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/pedromassango/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2021.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 55.1.5
• Dart plugin version 211.7179

[✓] VS Code (version 1.55.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.16.0

[✓] Connected device (3 available)
• Redmi 5 Plus (mobile) • 0258ff700005 • android-arm64 • Android 8.1.0 (API 27)
• macOS (desktop) • macos • darwin-x64 • macOS 11.2.3 20D91 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.93

• No issues found!

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.