Skip to content

Conversation

@helin24
Copy link
Member

@helin24 helin24 commented Jun 12, 2020

App should be paused on run mode as well as on debug mode so we won't miss any events from the beginning of an app's running.

Verified that a project can be run without hangs in run mode (no breakpoints), profile mode, and release mode.

}

if (mode == RunMode.DEBUG) {
if (mode == RunMode.DEBUG || mode == RunMode.RUN) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any other mode? also make sure we are not breaking release/profile mode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also RunMode.PROFILE - I guess it would make sense to enable --start-paused for all of the IntelliJ modes (so in that case just remove this conditional)?

I'm having trouble testing flutter profile mode and release mode. Do I need to go through some additional setup steps for this? I se this doc for iOS at least https://flutter.dev/docs/deployment/ios

@jacob314
Copy link
Contributor

lgtm

@helin24 helin24 merged commit c241d2e into flutter:master Jun 15, 2020
@helin24 helin24 deleted the pause branch June 15, 2020 16:23
@gmcdowell
Copy link

Guys it looks like you have caused considerable chaos for us Flutter Developers with this change.

In short when I now run a Flutter Test via IntelliJ, tests no longer run at all as you have paused them with NO way of changing this behaviour.

Please revert

Screen Shot 2020-06-29 at 1 05 07 PM

@blasko
Copy link

blasko commented Jun 29, 2020

This is a full stop breaking change that needs to be addressed asap.

image

@franferri
Copy link

Same problem here.

helin24 added a commit that referenced this pull request Jun 29, 2020
helin24 added a commit that referenced this pull request Jun 29, 2020
@benoitskipr
Copy link

running them in debug mode shows the error in console still, but tests run (as a temp fix)

@franferri
Copy link

I have open a TT to flutter themselves: flutter/flutter#60486 (comment)
Maybe I had to post it here

@franferri
Copy link

I have installed today in Android Studio the plugins Flutter and Dart. Last versions.

I was working for hours doing tests in my project and after the update suddenly I can't run the Flutter tests anymore, it keeps saying:

Warning: You should set `SILENT_OBSERVATORY` to true when debugging the VM as it will output the observatory URL by default.
This breaks the various reporter contracts.
To set the value define `DART_VM_OPTIONS=-DSILENT_OBSERVATORY=true`.

I'm using macOS last version with Flutter stable channel:

Flutter 1.17.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1ad9baa8b9 (11 days ago) • 2020-06-17 14:41:16 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4
I have tried to add the DART_VM_OPTIONS=-DSILENT_OBSERVATORY=true to the environment, export in a console and then start Android Studio with open -a... nothing works.

Either Flutter is rewriting the var or the build-in dart-sdk not picking it.

Since setting the variable as global don't work, nor in the terminal session before running Android Studio, nor Android Studio let you change anything in the dart plugin panel... I'm out of options

if anybody knows how to fix this please help.

Posted in stackoverflow too in a desperate attempt to get help: https://stackoverflow.com/questions/62629506/dart-vm-options-dsilent-observatory-true

Steps to reproduce:

macos, download android studio, install flutter plugin, new flutter project, run the test with right click, run test (you may have edit the runtest configuration to mark it as flutter test instead of dart test).

As simple as that, the sample project don't run the tests, nor any other project you may have.

@franferri
Copy link

franferri commented Jun 29, 2020

Tested solution till this get solved for Android Studio.

  1. Go to plugins and remove dart and flutter ones, uninstall completelly
  2. From the following URL's download the previous versions (click load more at the end of the page till the versions show):
  1. Use the following versions (before the Jun25 aberration versions
  • Dart Plugin (193.6911.31)
  • Flutter Plugin (46.0.2)
  1. Live the dream

To manually install a plugin from disk go to "Preferences" -> "Plugins" -> Click the little cog icon near the "Installed" tab -> Choose "Install Plugin from Disk..."

@helin24
Copy link
Member Author

helin24 commented Jun 29, 2020

@franferri thanks for the detailed report and suggestion - I've reverted this change and this will be released soon. In the meantime, using v46 of the flutter plugin (without changing the dart plugin) should work, and you should also be able to run your tests in debug mode.

@Arkangel12
Copy link

Tested solution till this get solved for Android Studio.

  1. Go to plugins and remove dart and flutter ones, uninstall completelly
  2. From the following URL's download the previous versions (click load more at the end of the page till the versions show):
  1. Use the following versions (before the Jun25 aberration versions
  • Dart Plugin (193.6911.31)
  • Flutter Plugin (46.0.2)
  1. Live the dream

To manually install a plugin from disk go to "Preferences" -> "Plugins" -> Click the little cog icon near the "Installed" tab -> Choose "Install Plugin from Disk..."

This steps fail for me in IntelliJ, when i remove Dart and Flutter plugins and try to manually added it sent a message of no compatibility.

when we can have this fix at the IntelliJ marketplace?

@franferri
Copy link

franferri commented Jun 29, 2020 via email

@Arkangel12
Copy link

i did download the exact files it not a file issue, looks like i another problem trying to load a plugin manually in IntelliJ.

This i the message i receive when i try to do it

@lukechi1219
Copy link

lukechi1219 commented Jun 30, 2020

after install latest Flutter plugin with this fix, Android Studio (IntelliJ) runs flutter test with wrong flag "--start-paused" which would wait for a debugger to connect. Yet in run test mode there won't be a debugger, so it waits until timeout.

flutter test -h
--start-paused Start in a paused mode and wait for a debugger to connect.
You must specify a single test file to run, explicitly.
Instructions for connecting with a debugger are printed to the console once the test has started.

PLEASE rollback asap...

unknown (1)

my env info

[√] Flutter (Channel beta, 1.19.0-4.1.pre, on Microsoft Windows [Version 10.0.18363.592], locale en-US)
• Flutter version 1.19.0-4.1.pre at C:\tools\flutter
• Framework revision f994b76974 (3 weeks ago), 2020-06-09 15:53:13 -0700
• Engine revision 9a28c3bcf4
• Dart version 2.9.0 (build 2.9.0-14.1.beta)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\LukeChiL5400\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Users\LukeChiL5400\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6514223\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.

[√] Android Studio (version 4.0)
• Android Studio at C:\Users\LukeChiL5400\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\193.6514223
• Flutter plugin version 47.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

@safarmer
Copy link

safarmer commented Aug 5, 2020

Also, there is no option to run tests in debug mode if you are running all tests in a folder. Everything works when I run an individual file.

@helin24
Copy link
Member Author

helin24 commented Aug 5, 2020

@safarmer thanks for noting this - going to be tracking this in #4737 if you want to follow updates.

@elias8
Copy link

elias8 commented Sep 17, 2020

Any updates, please?

@helin24
Copy link
Member Author

helin24 commented Sep 17, 2020

@elias8 we made a temporary fix for directory tests in run mode, but debug mode for directory tests will require more work and is not one of our priorities currently. You can upvote or comment on #4742 if this is important to you. (alternatively, if you've seen a regression for a separate problem mentioned here, feel free to post details in a new issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.