Dart-Code: Dart DevTools exited with code 255 in brand new flutter installation
I am seeing this error message when trying to open DevTools from Visual Studio Code:
I tried running flutter pub global activate devtools
but this didn’t fix the issue.
I also tried running flutter pub global run devtools
, but then I see this other error:
pub finished with exit code 65
I am not sure which other information is needed, so please let me know in case I need to provide anything else
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 23 (10 by maintainers)
Running
pub global activate devtools
withoutflutter
in the beginning fixed the issue for me. Thank you very much for the help! 😃The issue was introduced with a DevTools update that just happened to go out around the same time as the Flutter update. VS Code will have auto-updated your DevTools to the latest one and then hit this issue.
Installing Google Chrome is the only workaround I know of until the DevTools fix is available in a release.
A new version of DevTools has been published that fixes this, so it’s no longer necessary to disable updates in the VS Code settings. Just run
dart pub global activate devtools
and leave the setting ticked and everything should be good.I had the same problem. Try the following:
pub global activate devtools
Resolved.
The new version is already published on Pub, but if you’re using a mirror or something that prevents you getting it, you should be able to downgrade to the previous version with
pub global activate devtools 0.2.3
.It depends how you installed Flutter, but if running
flutter pub
didn’t fix it, I would expectpub
to.flutter pub
andpub
may have different pub-cache folders, and VS Code always usespub
when running DevTools (because it can be launched from non-Flutter apps and we don’t want to maintain two activated versions).If
pub
isn’t in yourPATH
, you’ll need to provide the full path. That path may vary depending on where you’ve installed Flutter, but it’s at(flutter sdk)/bin/cache/dart-sdk/bin/pub
.Please let me know if you still have issues launching in VS Code after running
pub global activate devtools
(notflutter pub
). This will become easier in the next version of VS Code.If anyone knows why
pub
thinks they have DevTools installed but does not have a pubspec, I’d love to understand why this is happening so much lately. Have you manually deleted your pub cache folders or anything similar?