New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter beta testing #318

Closed
DanTup opened this Issue Jun 13, 2017 · 64 comments

Comments

8 participants
@DanTup
Member

DanTup commented Jun 13, 2017

Download v1.5.0-beta.flutter.5 here

If testing, please post feedback in this thread including which platform you were testing on (Win/Mac/Linux). Any problems/issues can be raised as new issues but general feedback (even if everything works) is encouraged to help gauge stability (esp on platforms I can't test).

Since there may be updates to this beta version, you may wish to subscribe to this thread to get notifications

Gitter Chat

Installing

  • Uninstall any existing version of Dart Code from Code and restart Code
  • Download the vsix from the link above
  • Run the Extensions: Install from VSIX command from the Code command palette and browse to the downloaded vsix file
  • Restart Code again

Note: To revert to the marketplace version of the extension you will need to uninstall the beta version explicitly first.

Some things to test

If you test any of these any they work, please let me know (and on which platform)!

Windows

  • Flutter projects are detected as flutter and the Dart SDK version number in the status bar (right) shows that it's the Flutter version
  • Standard Dart projects are still detected as Dart and the Dart SDK version number in the status bar (right) does not mention Flutter
  • pub get and pub upgrade packages have been replaced by flutter commands in the command palette/pubspec.yaml toolbar
  • The status bar shows when a device is connected and if multiple devices are connected you can click on it to select the one to use for launching/debugging
  • You can launch apps on the selected device by pressing F5 (note: the first time you do this, Code will ask what type of app - select Flutter which will open launch.json and then hit F5 again to launch
  • Breakpoints are hit correctly and you can step with the debugger
  • Other debugger features work correctly (stack traces shows, can be navigated, watched variables/locals etc. work)
  • Pressing the debugger Restart button (also Ctrl+Shift+F5) causes a hot reload
  • Breakpoints work after hot-reloading

Mac

  • Flutter projects are detected as flutter and the Dart SDK version number in the status bar (right) shows that it's the Flutter version
  • Standard Dart projects are still detected as Dart and the Dart SDK version number in the status bar (right) does not mention Flutter
  • pub get and pub upgrade packages have been replaced by flutter commands in the command palette/pubspec.yaml toolbar
  • The status bar shows when a device is connected and if multiple devices are connected you can click on it to select the one to use for launching/debugging
  • You can launch apps on the selected device by pressing F5 (note: the first time you do this, Code will ask what type of app - select Flutter which will open launch.json and then hit F5 again to launch
  • Breakpoints are hit correctly and you can step with the debugger
  • Other debugger features work correctly (stack traces shows, can be navigated, watched variables/locals etc. work)
  • Pressing the debugger Restart button (also Ctrl+Shift+F5) causes a hot reload
  • Breakpoints work after hot-reloading

Linux

  • Flutter projects are detected as flutter and the Dart SDK version number in the status bar (right) shows that it's the Flutter version
  • Standard Dart projects are still detected as Dart and the Dart SDK version number in the status bar (right) does not mention Flutter
  • pub get and pub upgrade packages have been replaced by flutter commands in the command palette/pubspec.yaml toolbar
  • The status bar shows when a device is connected and if multiple devices are connected you can click on it to select the one to use for launching/debugging
  • You can launch apps on the selected device by pressing F5 (note: the first time you do this, Code will ask what type of app - select Flutter which will open launch.json and then hit F5 again to launch
  • Breakpoints are hit correctly and you can step with the debugger
  • Other debugger features work correctly (stack traces shows, can be navigated, watched variables/locals etc. work)
  • Pressing the debugger Restart button (also Ctrl+Shift+F5) causes a hot reload
  • Breakpoints work after hot-reloading

If you get stuck, feel free to give me a shout in Gitter Chat.

@Skylled

This comment has been minimized.

Contributor

Skylled commented Jun 13, 2017

For those who haven't had to manually install an extension before, the Command Palette has Extensions: Install from VSIX. Navigate it to your downloaded copy and you're set. :)

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 13, 2017

Can't you just double-click the vsix file?

@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 13, 2017

Can't you just double-click the vsix file?

Not on Mac at least.

@Skylled

This comment has been minimized.

Contributor

Skylled commented Jun 13, 2017

Definitely not for me (Windows). And using "Open with Code Insiders" just tried to open the binary for editing.

@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 13, 2017

@DanTup This is a silly question but I can't seem to find how to run the app...

@mit-mit

This comment has been minimized.

Contributor

mit-mit commented Jun 13, 2017

@pulyaevskiy Hit Debug > Start Debugging and when prompted add a 'Flutter mobile app' launch config.

@mit-mit

This comment has been minimized.

Contributor

mit-mit commented Jun 13, 2017

@DanTup is there a device/target picker somewhere?

@Skylled

This comment has been minimized.

Contributor

Skylled commented Jun 13, 2017

@mit-mit It should be the device name in the bottom-right corner. (I don't have 2 devices to test right now, but that's what I remember being discussed.)

@mit-mit

This comment has been minimized.

Contributor

mit-mit commented Jun 13, 2017

Oh, I see that now. I'm used to the that lower bar being an "output only" status bar. Is that usually used for input in VSCode?

@Skylled

This comment has been minimized.

Contributor

Skylled commented Jun 13, 2017

@mit-mit I believe it was to keep in-line with where VS Code lets you select the current file's Language Mode, Encoding, EoL type, etc. I guess that's just the way VS Code does things.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 13, 2017

Oops, sorry, thought you could double-click! I've added some notes on installing/using to the top of this page (inc. a bunch of things work testing).

@pulyaevskiy F5 is easiest, though the first time you'll need to do select Flutter then do it again (the first time populates the launch.json file and opens it for editing in case you need to fill anything in - for now you don't).

@mit-mit Yeah, this is consistent with similar things in Code (eg. setting indentation, language, encoding and other things that appear in the status bar). That said; I think those other things may also have commands in the command palette to invoke them - I'll check when next at PC and if so, I'll add one for this too (that probably also makes it possible for the user to key-bind)

@DanTup DanTup referenced this issue Jun 13, 2017

Closed

Support running and debugging flutter applications #198

13 of 13 tasks complete
@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 13, 2017

Thanks @mit-mit , @DanTup . My issue was that I installed beta version on top of the stable one, which made VSCode very confused. It didn't want to show me launch option for Flutter.

I had to do multiple restarts of VSCode deleting the beta version first, then the stable version and only after that installing beta again.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 13, 2017

Strange; I would've expected it to work fine (though you do need to restart once after installing normally). Glad it's sorted now!

I added a checklist to the top; would appreciate notes on things that work/don't, esp for people on Mac/Linux since I've not been able to do any testing of them!

@xster

This comment has been minimized.

xster commented Jun 13, 2017

I had the same issue as @pulyaevskiy. Probably not important and likely more a install vsix on top of stable extension issue than a Dart-Code issue but it was showing me the reload button on the Dart-Code extension even after reloading with that button. I think in practice, the extension never updated even if I quit the app, reopen the project etc.

Only uninstalling the stable version and installing straight from the vsix worked.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 13, 2017

Weird; does sound like a Code bug. I've added a note to uninstall the old version before installing this at the top.

@Solido

This comment has been minimized.

Solido commented Jun 13, 2017

Old plugin uninstalled, close VS, install beta from vsix on OSX, reload VSCode.
Dart code is not recognised anymore.
Flutter file are shown are plain text and dart type is no more listed.
Installing 14 again make code recognition OK
Dart 1.24

@xster

This comment has been minimized.

xster commented Jun 13, 2017

The debugger integration is super awesome!!!

One v1.6 feedback I'd have is that it'd be good to hook key input into the tool as well.

After running flutter run, the tool hangs around listens for more keys (options shown by pressing 'h'). It would be good to be able to communicate those via the extension.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 14, 2017

@Solido

Old plugin uninstalled, close VS, install beta from vsix on OSX, reload VSCode.

Strange! After installing like this, does the extension show up in the extensions list? If so, my guess is that something failed during activation. Could you click Help -> Show Developer Tools to open the Chromium dev tools and see if there are errors in the console? If so, please raise a new issue with the errors (if not, let me know and I'll think of something else to try).

@xster

One v1.6 feedback I'd have is that it'd be good to hook key input into the tool as well

After running flutter run, the tool hangs around listens for more keys (options shown by pressing 'h'). It would be good to be able to communicate those via the extension.

I don't understand, could you elaborate on this? You shouldn't be running flutter run, it's done behind the scenes for you (you should just hit F5). The mode we run flutter in (flutter run --machine) doesn't take key input, it's a JSON API.

If you mean you're just trying to access additional functionality that you can normally access with flutter run, can you give examples? I'm sure we can integrate them better than just passing keys through to the process (for example, hot reload is integrated with the debugger Restart button).

@Solido

This comment has been minimized.

Solido commented Jun 14, 2017

Uninstalled VSCode fully and reinstall to have the last version was it. Check for update skipped the last version.

All previous points confirmed except for debug points.
Breakpoints are triggered, I can navigate the stack and source is updated with but when exploring the variable content spinner never stop and nothing open to show values.
None of the action (run, enter, previous, next) trigger and action only choice is to stop the App.

Once breakpoint is reached all is frozen, smth calling Stop will break the connection with IOS simulator but the app is still lost in frozen state. I need to first relaunch the app which lead to

Unhandled exception:
Exit code 3 from: /usr/bin/xcrun simctl launch B847B97F-1BAE-48EF-9313-99BC7E7F92D2 com.yourcompany.projectSky ... --enable-checked-mode --start-paused --observatory-port=0 --diagnostic-port=8101
...
#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:214)
<asynchronous suspension>
#1      SimControl.launch (package:flutter_tools/src/ios/simulators.dart:253)
#2      IOSSimulator.startApp (package:flutter_tools/src/ios/simulators.dart:477)
<asynchronous suspension>
#3      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:233)
<asynchronous suspension>

This stop the simulator and I can start the app again.

All in all I love the experience, very limpid 💯

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 14, 2017

@Solido Interesting; that sounds exactly the issue I reported at flutter/flutter#10615. Last night it only occurred on the Hello World so I figured it was less important.

Seem like we'll need to get to the bottom of this before shipping.

@ everyone else - is anyone else seeing this same behaviour (process seems to freeze after hitting a breakpoint)? Or has anyone else been able to debug normally?

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 14, 2017

Another thing I'd love to have feedback on... Currently the debugger Restart button is "hot reload" and to do a full restart you need to Stop/Run again. Since I have no real experience of Flutter dev I don't know if the Stop/Run will become annoying - would it be better to have the Restart button do a full restart and add a separate command/keybinding that does a hot reload (unfortunately I think it's unlikely I'll ever be able to add an additional button to the debug toolbar, that's owned by Code).

@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 14, 2017

I haven't done a lot of Flutter dev, but from my limited experience I use Hot Reload all the time, so I think it deserves to have a dedicated button.

@Skylled

This comment has been minimized.

Contributor

Skylled commented Jun 14, 2017

The difference between Stop/Start and a Restart, is that Restart doesn't rebuild the apk to install.

I can't say with certainty, but I think it just closes the app on the device, resyncs files, and starts the app again. I'm sure someone from the Flutter team would know better.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 14, 2017

@Skylled Ok, so it sounds like there's a difference in behaviour between a "full restart" and actually stopping/re-running flutter run? I wonder why that is; if the APK doesn't need rebuilding for a "full restart" I wonder why flutter run rebuilds it?

If this is the case, it sounds like using the Restart button for hot reload might actually mean that full restarts (when required) are much slower. So I wonder if maybe we should use the restart button for a "full restart" and have another option (keybinding/toolbar button/maybe even notification when you save a file and are debugging) for hot reload.

@devoncarew interested in your opinion here; you probably have most flutter experience here (my experience is basically running Hello World and the Stocks example, so I won't know what % of the time people can use hot reload and how often they'd need full restarts).

@devoncarew

This comment has been minimized.

Contributor

devoncarew commented Jun 14, 2017

A hot reload will push changed files over to the device and attempt to patch the changes into the running app; user's generally do lots of reloads before fully restarting their app, and it's likely the experience we want to optimize for. Perhaps 600ms today?

A full restart sends any changed files over to the device (like reload), but then restarts the isolate. You lose any state that had been built up in the app. It's really not much slower than a hot restart. It's useful to expose, but probably not the experience we need to optimize for. This takes maybe 800 - 1,200 ms last I checked.

A stop and a re-run would need to re-build the apk and re-deploy it to the device. This would be ballpark 3-12 seconds.

My 0.02 would be to keep the Restart button hooked up to hot reload for improved discoverability of that feature, even at the expense of not exposing the full restart functionality well :)

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 14, 2017

@devoncarew Sounds good, thanks!

@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 15, 2017

Strange thing I noticed:

  • in a Flutter project all the commands (e.g. organize directives) and quick fixes (e.g. create constructor) are working fine
  • in a regular Dart project none work

Anyone else noticed it?

@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 19, 2017

@DanTup
I've finally spent some more times with the beta.

OS: MacOS
Devices: iOS simulator

Couldn't get breakpoints to work but everything else from the list is working fine.
I couldn't test stack traces with debugger because it wouldn't want to break on exceptions.

I also got a "Lost connection to device" error once, which terminated debug session.

@Skylled

This comment has been minimized.

Contributor

Skylled commented Jun 19, 2017

In the off chance that Flutter cannot install an app to the device, the debugging process doesn't stop.
Logs:

Launching lib\main.dart on LG H910 in debug mode...
Built C:\flutter\examples\stocks\build\app/outputs/apk/app-debug.apk (21.7MB).
Error: ADB exited with exit code 1
Error launching application on LG H910.

But the process continues.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 20, 2017

@pulyaevskiy

I couldn't test stack traces with debugger because it wouldn't want to break on exceptions.

You should be able to see the stack when it breaks on a breakpoint (even if it freezes shortly after!)

I also got a "Lost connection to device" error once, which terminated debug session.

Interesting - where did you see this? This is somewhat out of Dart Code's control but I wonder if it might be related/similar to the connection to observatory breaking. Can you repro this?

@Skylled

In the off chance that Flutter cannot install an app to the device,

Thanks for the info - could you chuck this in a new issue, including a description or screenshot of what happens after this (I presume Code thinks that it's debugging and keeps showing the debug toolbar?).

@pulyaevskiy

This comment has been minimized.

Contributor

pulyaevskiy commented Jun 21, 2017

You should be able to see the stack when it breaks on a breakpoint.

it just never did break on a breakpoint for me.

Can you repro this?

Seems random, wasn't able to reproduce yet. Will try to collect more info when/if it happens again.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 21, 2017

it just never did break on a breakpoint for me.

I guess this is the same issue others (and I) are seeing. Normally I can hit a breakpoint but after a second or so it's unresponsive. I suspect if it took longer to get to the first breakpoint it may miss that too.

Hoping to do some more digging on Friday.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 23, 2017

May have a fix for the debugging issue (#332). If I can get some time to test this today I'll create a new beta release with the fix for more testing. Hopefully then there's only fairly minor things to fix before releasing for real (some of this might get delayed for a v1.4.3 to address some debugging issue in 1.25 SDK though).

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 23, 2017

Ok, there's a new beta release.

You may need to uninstall the previous version before installing this. It's the same as the previous version except it has a fix for the debug stepping issue (the problem was that we were connecting to the debugger too early - which strangely allows it to work for a few seconds and then it stops).

Please test it out and let me know if it resolves all the debugging issues you had.

@DanTup DanTup added this to the v1.5 milestone Jun 23, 2017

@amugofjava

This comment has been minimized.

amugofjava commented Jun 23, 2017

Tested with VS Code 1.13 & Ubuntu 14.04.

I tried all the points within the Linux section above and all worked fine except for an issue with Debug and hot reload. If I launch a Flutter app and hit a breakpoint I can step through the code in VS. If I then make a change and perform a hot reload, VS will no longer stop at the breakpoint. If I do a full restart the debugging starts working again. Not sure if this is expected behaviour, but comparing it to IntelliJ, the breakpoints still work after a hot reload.

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 23, 2017

@amugofjava Excellent; thanks for the testing! The behaviour you describe is not expected; if it works in IntelliJ it should also work here. I'll see if I can repro and if not I might give you some instructions to get debug logs that'll help.

@mit-mit

This comment has been minimized.

Contributor

mit-mit commented Jun 23, 2017

@DanTup I believe we added that support for IJ via flutter/flutter-intellij#305

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 23, 2017

@mit-mit Aha! That would explain it; if the breakpoints are lost I'll need to resend them. Should be easy. Thanks! :-)

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 25, 2017

Possibly related to the issues people had with vsix installs: Microsoft/vscode#19259

An extension which is installed manually through a VSIX and an extension with the same ID that gets fetch from the gallery are not considered to be the same extension.

Based on this, when v1.5 releases for real, you'll need to be sure to install the vsix version explicitly!

@DanTup

This comment has been minimized.

Member

DanTup commented Jun 29, 2017

Unfortunately I've hit another issue with debugging flutter apps. Breakpoints don't seem to work after a hot reload (even after I've implemented what I understood to be required). I've raised flutter/flutter#11040 hoping for some input; though it means it's likely to be a little longer before this is ready to release (I'd hoped it'd be in a reasonable state this weekend, but it's very unlikely now).

Once I managed to get to the bottom of these issues I'll upload another beta for some final testing before it goes live. Thanks for all the testing so far!

@DanTup

This comment has been minimized.

Member

DanTup commented Jul 5, 2017

I've uploaded a new beta version.

Please uninstall the previous beta and try this one; it will hopefully resolve issues with breakpoints not being hit after a hot reload (note: there is a race condition caused by flutter/flutter#10934 which needs fixing in the SDK).

Let me know if you hit any issues; I've only been able to test on Windows.

@DanTup

This comment has been minimized.

Member

DanTup commented Jul 6, 2017

I've had a little feedback on this so far, but only from Windows users. If anyone is able to give beta4 a test on Linux and/or Mac I'd appreciate it.

I believe this is basically complete and plan to ship 2.0 next week once I've finished a couple more minor changes.

@amugofjava

This comment has been minimized.

amugofjava commented Jul 6, 2017

I'll try and give it another go on my Ubuntu setup tomorrow if I get chance. :)

@DanTup

This comment has been minimized.

Member

DanTup commented Jul 7, 2017

I've pushed a final flutter beta (beta5) here:

https://github.com/Dart-Code/Dart-Code/releases/tag/v1.5.0-beta.flutter5

I believe this is basically feature complete and will be shipped as v2.0 in the next week or so (maybe with some fixes, depending on feedback). If you're able to try this out, please let me know how it works (and on what platform).

In addition to fixes in previous betas there have been some other minor tweaks:

  • #319 - Hide trailing commas in code completion
  • #329 - Ensure debugger terminates when app installs fail
  • Analysis server version shown alongside SDK version in status bar
  • #340 - When running with Ctrl+F5 don't connect debugger
  • #327 - Set FLUTTER_HOST env var for Flutter tools telemetary
  • #328 - Include Dart vs Flutter tag in analytics
@mit-mit

This comment has been minimized.

Contributor

mit-mit commented Jul 7, 2017

I tested beta5 on macOS, and unfortunately seem to be having some issues with breakpoints, opened #357.

All non-breakpoint related items on the checklist work fine on macOS.

@DanTup

This comment has been minimized.

Member

DanTup commented Jul 7, 2017

@mit-mit Thanks; I've added some notes to that case that might help track it down. Not sure if it might've been a one-off (the error is weird, and probably not my fault).

Curious if anyone else has same behaviour on Mac OS (@devoncarew on Mac?); I don't have access to one to test :-(

@DanTup

This comment has been minimized.

Member

DanTup commented Jul 10, 2017

I'm planning on pushing Dart Code v2 out tomorrow evening (~26 hours from now). I should have some time on Thurs/Fri to push out an update if it does happen to have issues and I can fix them.

@mit-mit I'll tackle #357 in 2.1 if you can still repro and provide some more info.

Thanks everyone that helped test and provided feedback; it's great to (finally) publish this!

@DanTup DanTup closed this Jul 10, 2017

@DanTup

This comment has been minimized.

Member

DanTup commented Jul 14, 2017

ICYMI, Dart Code v2 is available in the marketplace. Be sure to uninstall any beta version and restart Code before installing (Code doesn't properly consider vsix and marketplace extensions as the same).

@DanTup

This comment has been minimized.

Member

DanTup commented Dec 29, 2017

I noticed in the stats there are still some people using the Flutter beta version of Dart Code! :/

In older versions of Dart Code, vsix extensions didn't upgrade cleanly when the marketplace version was newer. If you installed a beta version of Dart Code and don't think you've seen any updates recently, please try uninstalling the extension, restart Code, check whether it still appears installed (and if so, uninstall again and restart Code again) and then install again from the marketplace!

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