flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

[Feature Request] Run custom flutter command in Run/Debug configuration

Open matanshukry opened this issue 6 years ago • 4 comments

I would like to create a build configuration for running custom flutter command. My specific use case is "flutter driver" for integration tests, but I think generally there should be a way to run flutter command on a run/build configuration.

matanshukry avatar May 03 '19 12:05 matanshukry

We can certainly consider adding another command to the Tools > Flutter menu.

You can do this today by configuring an external tool and adding it to the Before launch box in the run configuration. The Jetbrains docs have more details on external tools and run configurations.

stevemessick avatar May 03 '19 20:05 stevemessick

Cool, didn't know that. And what should be the actual configuration? Considering I only want to run flutter driver, and not any other command

matanshukry avatar May 04 '19 01:05 matanshukry

Thanks @darshankawar for directing me to this workaround. Following these steps, I was able to set up a run config for flutter driver. Here's the External Tool that I've created for flutter driver.

External Tools

Adding the "External tool" to be run on Before launch in the Run Config works well.

Run Config

omatt avatar Jul 02 '21 15:07 omatt

For me it worked to just ditch flutter drive and run/debug the test itself in a Flutter configuration, if that's what you want. Can even select the device from UI as used to without specifying in drive config (e.g. -d web-server --no-headless)

golane-august avatar Jan 19 '22 13:01 golane-august