Dart-Code: Dart DevTools exited with code 255 Flutter VS Code

When I try to open Dart DevTools in VS CODE. Shows error that “Dart DevTools exited with code 255”. Here is my flutter doctor -v output

PS D:\FlutterProjects\expenses_app> flutter doctor -v [√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18362.720], locale en-US) • Flutter version 1.12.13+hotfix.9 at D:\Flutter\flutter • Framework revision f139b11009 (5 days ago), 2020-03-30 13:57:30 -0700 • Engine revision af51afceb8 • Dart version 2.7.2

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at D:\AndroidSDKComponentSetup • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.3 • ANDROID_HOME = D:\AndroidSDKComponentSetup • Java binary at: D:\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04) • All Android licenses accepted.

[!] Android Studio (version 3.6) • Android Studio at D:\Android Studio X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.43.2) • VS Code at C:\Users\SagarKhurana\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.8.1

[√] Connected device (3 available) • SM J200G • 320136c19c48b45b • android-arm • Android 5.1.1 (API 22) • Redmi 8 • ad4810d10506 • android-arm64 • Android 9 (API 28) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 17 (7 by maintainers)

Most upvoted comments

That message means pub could not be find in your PATH environment variable. You could either:

@laurameckley-wk feel free to open a new issue here if you want and we can get a full log to see if it’s a known issue.

@sagarkhurana00786 aha, that looks right - the logs include this error:

Invalid argument(s): A directory corresponding to fileSystemPath "C:\Users\Sagar Khurana\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\devtools-0.2.3\build" could not be found
#0      createStaticHandler (package:shelf_static/src/static_handler.dart:50:5)

Can you try running:

pub global deactivate devtools
pub global activate devtools

And then in your project folder run:

pub get

Also, if you haven’t rebooted since changing your username, do that too.

Let me know if you still see this issue after those steps.