Reputation: 421
I am using Android Studio 3.1.3 and my flutter inspector doesn't show anything in it.
https://flutter.io/inspector/#flutter-widget-inspector
select widget button etc... are not appearing.(However flutter outline is wokring)
I have installed both flutter and dart plugins.
Upvotes: 18
Views: 48567
Reputation: 11
If you use a real device to debug like me, try to open another virtual imulatior/emulator on your computer you can close it as soon as it's opened, it will wake up your sleeping inspector in VS Code.
Upvotes: 1
Reputation: 31
My solution here:
Upvotes: 0
Reputation: 1
I had the same error after several tests, comparing the configuration files I realized that the error was in my launch.json configuration file.
"version": "0.2.0",
"settings": [
{
"name": "main",
"type": "dart",
"request": "launch",
"program": "lib/main.dart"
},
{
"name": "portal_amazonas Debug",
"request": "launch",
"type": "dart",
"args": [
"--flavor",
"portal_amazonas"
],
"program": "lib/flavors/main_portal_amazonas.dart"
},
{
"name": "portal_amazonas",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": [
"--flavor",
"portal_amazonas"
],
"program": "lib/flavors/main_portal_amazonas.dart"
},
{
"name": "control_care Debug",
"request": "launch",
"type": "dart",
"args": [
"--flavor",
"control_care"
],
"program": "lib/flavors/main_control_care.dart",
},
{
"name": "control_care",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args": [
"--flavor",
"control_care"
],
"program": "lib/flavors/main_control_care.dart",
},
{
"name": "Run all tests",
"type": "dart",
"request": "launch",
"program": "test/",
},
]
}
See that the parameter "flutterMode": "profile" which could be "flutterMode": "debug", or "flutterMode": "release",
After removing this parameter everything returned to normal.
OBS: in my case I have flavors configured
Upvotes: 0
Reputation: 568
Flutter inspection is not working, all suggested workarounds above already tested.
Android 2021.3.1 Patch 1 Flutter installer 3.3.6-stable
Error:
When I click in the suggested link:
My Current Android Installation:
My hardware is a M1 MacBook Pro 8GB, 512HD, no issues into running the app itself, just the Inspector not working.
Any Ideas? Should I make this into a Question? I preferred to keep in the thread.
Upvotes: 0
Reputation: 1
A very rough but always valid fix is to change to a different version of the SDK (and then back, if necessary).
flutter channel master && flutter channel stable
Upvotes: 0
Reputation: 790
Android Studio > Preferences > Languages & Frameworks > Flutter > App Execution > Open Flutter Inspector view on launch
Close and Relaunch Android Studio > Open any Flutter Project > Open iOS Simulator or Android Emulator and Run Debug Mode
View > Tool Window > Flutter Inspector
PS: 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.
Upvotes: 35
Reputation: 113
I'm having same issue with flutter 2.10.5. I think this is a bug related to flutter plugin. alternatively, you can use Flutter inspector on browser by clicking Flutter Performance Tab, Open Devtools
Upvotes: 0
Reputation: 1248
This helped me get it back to work in VSCode.
flutter clean
in your terminalF1
Dart: Open Dev Tools
and click enterOpen Widget Inspector Page
The Widget Inspector will now display the Widget Tree.
Upvotes: 2
Reputation: 39
The following steps helped me to get Flutter Inspector Widget Tree back:
File -> Settings -> Languages & Frameworks -> Flutter:
Enable (Check) "Open Flutter Inspector view on app launch" checkbox
Disable (Uncheck) "Disable tracking widget creation locations" checkbox
Stop, start the app again.
Upvotes: 3
Reputation: 36017
I had the same problem and looks like toggling on and off Show repaint Rainbow is fixing it and renders the widget tree.
Upvotes: 2
Reputation: 15789
To make Flutter Widget Inspector work.
And you will be able to see the Flutter Widget Inspector working :)
P.s. It is still not working, Select RenderTree or Performance and then Widget. It will get refreshed. This is how it is working at my end.
Upvotes: 4