Setting up DevTools failed (Flutter Inspector)

Viewed 2468

I could not find solution to this either on google or here on StackOverflow. There is only and only 1 question answered related to this issue [https://stackoverflow.com/questions/64655867/about-android-studio-and-flutter-inspector], however for a beginner like me, its not clear about what exactly to do.

Additional information:

  • OS: Windows
  • Android studio version 4.1.1
  • App is running in avd when I opened flutter inspector panel.
  • Stopped and run the app again.
  • Previously, somewhere I read that if inspector is not showing anything, click on any widget pressing ctrl key. That worked previously, but not working now. Sure, that was different error and different situation.
  • flutter doctor screenshot also attached

flutter inspector screenshot

flutter doctor screenshot

3 Answers

This answer from related question helped.

... And the third one (the one that worked for me): go to File > Settings > Languages & Frameworks > Flutter > Experiments … and there you should uncheck “Enable embedding DevTools in the Flutter Inspector tool window”. That should allow you to use devtools locally instead of the embedded ones.

picture for reference

Source: https://stackoverflow.com/a/65542661/17789382

Launch Flutter DevTools from terminal using command dart devtools which opens DevTools in the browser. Connect to the address in which debug/run service listening on. Address can be found in the console when the app starts running. Ex: ws://127.0.0.1:54851/JF3H6rhQnN0=/ws.

The following steps helped me to get Flutter Inspector Widget Tree back, hopefully, it will help you as well:

  1. File -> Settings -> Languages & Frameworks -> Flutter:
  2. Enable (Check) "Open Flutter Inspector view on app launch"
  3. Stop and start the app again.

Note: In order for something to show up in the Flutter Inspector, your app has to be running on a Device or on a Simulator or Emulator.

Related