Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter inspector bugging out/freezing in Visual Studio Code

Today was the first day I came across this issue with flutter widget inspector. When you click "Select Widget Mode" then select an element, it will freeze, and this inception-like view will occur: enter image description here

In addition, if you just resize this window in Visual Studio code, the Widget Inspector view goes blank:

enter image description here

I've almost lost an entire day of development because of this stupid bug.

I have a feeling something got updated automatically and broke things. Does anyone have any idea why this is occurring? It was working so well then all the sudden today it decided to break.

like image 875
Josh O'Connor Avatar asked Dec 30 '20 22:12

Josh O'Connor


People also ask

Why does VS code keep freezing?

If while opening a large file, VSCode freezes and then crashes, you need to delete some files. So, open Run, paste “%AppData%” and click Ok. Now, open Code > Backup and then delete the only folder that is inside that directory. Finally, restart VSCode and see if the issue persists.

Is VSCode good for Flutter?

VS Code is a lightweight editor that has great Flutter support, good extensibility and sees widespread use across the developer community.

How do I enable VSCode flutters?

Install the Flutter and Dart pluginsStart VS Code. Invoke View > Command Palette…. Type “install”, and select Extensions: Install Extensions. Type “flutter” in the extensions search field, select Flutter in the list, and click Install.


1 Answers

I ran into this issue and did some research. There appears to be some bug reports around this.

  • https://github.com/flutter/devtools/issues/2581
  • https://github.com/Dart-Code/Dart-Code/issues/3024
  • https://github.com/flutter/flutter/issues/65480 (fixed here)

This will require a new release of DevTools. Until this happens you can add the following to your VS Code settings.json.

"dart.embedDevTools": false,

This will open DevTools, from VS Code, in your browser.

like image 180
Patrick Wolf Avatar answered Oct 27 '22 06:10

Patrick Wolf