I can't start the Dart Dev Tools in VS Code, when I launch in debugging mode it opens a chrome window says Connect to a running app
Enter a port or URL to a running Dart or Flutter application.
When I hover over the Dart DevTools
button, it shows a port but I still can't connect to it.
Any ideas?
Start your flutter app with --observatory-port
option. For example,
flutter run --observatory-port=9200
Once the app starts, you’ll see a message in your terminal that looks like:
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9200/Swm0bjIe0ks=/
Paste the URL you got from running your app (http://127.0.0.1:9200/Swm0bjIe0ks=/)
into the connect dialog to connect your app to DevTools.
Hope this helps.
In Run flutter in Terminal with port you want. It can 9200 or 9300 or 9301 etc flutter run --observatory-port=9200
On the logcat you will see message look like "An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9200/Swm0bjIe0ks=/"
After that copy and past url (http://127.0.0.1:9200/Swm0bjIe0ks=/) to dialog connect your app to DevTools
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With