Unable to activate Dart Devtools

Viewed 8274
7 Answers

Instead of using flutter pub global activate devtools ,

Use this :
pub global activate devtools

It's the correct way to activate devtools (if you have pub in your path)

Info : You could use flutter pub global activate devtools ,if you have flutter in your path .

You have two solutions:

  • Update your flutter version

  • write flutter pub pub global activate my_package (yes, pub is written twice)

Try to disable your antivirus for like 5 minutes and then go to the flutter directory

C:\src\flutter

and run the command

flutter pub global activate devtools

Note: The flutter path should be set in env variables before running this.

Ctrl + Shift + P -run command palette. Then run: Run Flutter Upgrade

I was experiencing this same issue, and also getting error messages when viewing extension pages

Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker

The solution that fixed both (the error 255 Dart DevTools, and this webview error) was found here (kill all instances of VS Code, then clear VS Code caches).

I am a mac user so you can use this command to enable dart.

export PATH="/Users/<MAC_USER_NAME>/Desktop/developer/flutter/bin/cache/dart-sdk:$PATH"

To activate devtools, use this command

dart pub global activate devtools
Related