devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Widget inspector not working vscode

Open SalomeViz opened this issue 2 years ago • 22 comments

I'm not being able to see the widget tree after selecting a widget. This started after I downgraded my flutter version for project issues.

image


DevTools version: 2.20.1 Connected Device: CPU / OS: arm64 (64 bit) ios Dart Version: 2.18.0 Flutter Version: 3.3.0 / stable Framework / Engine: ffccd96b62 / 5e9e0e0aa8 Connected app type: Flutter native (debug build)

SalomeViz avatar Feb 03 '23 20:02 SalomeViz

@jacob314

polina-c avatar Feb 10 '23 22:02 polina-c

@SalomeViz If you are able to reproduce this, could you please give the following a try?

  • Reproduce this issue:
  • In Run the command "Toggle Developer Tools"
    • You can use the CMD+SHIFT+P shortcut then start typing "toggle developer tools" to run this command
  • the developer tool console should now open
  • you may see some errors in that log that look relevant to this issue
  • if you see any there that look relevant, then you can share those here and they may point us to what is going wrong.

CoderDake avatar Feb 15 '23 16:02 CoderDake

This is what I'm getting:

image

main.dart.js:61194 GET http://127.0.0.1:9100/inspector/api/ping 404 (Not Found) j3 @ main.dart.js:61194 bT2 @ main.dart.js:43454 (anonymous) @ main.dart.js:138233 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 $1 @ main.dart.js:56916 qt @ main.dart.js:58110 $0 @ main.dart.js:57399 Kh @ main.dart.js:6157 qT @ main.dart.js:57319 $0 @ main.dart.js:57366 c5z @ main.dart.js:6189 c61 @ main.dart.js:6191 $1 @ main.dart.js:56861 c8z @ main.dart.js:4782 (anonymous) @ main.dart.js:4790 childList (async) $1 @ main.dart.js:56868 bLJ @ main.dart.js:6196 bsA @ main.dart.js:6304 qE @ main.dart.js:58118 axv @ main.dart.js:57326 jM @ main.dart.js:57324 bs @ main.dart.js:57239 $1 @ main.dart.js:44309 bZM @ main.dart.js:4661 c4c @ main.dart.js:41751 (anonymous) @ main.dart.js:41747 Promise.then (async) ap @ main.dart.js:8768 (anonymous) @ main.dart.js:192 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 $1 @ main.dart.js:56916 qt @ main.dart.js:58110 $0 @ main.dart.js:57399 Kh @ main.dart.js:6157 qT @ main.dart.js:57319 $0 @ main.dart.js:57366 c5z @ main.dart.js:6189 c61 @ main.dart.js:6191 $1 @ main.dart.js:56861 c8z @ main.dart.js:4782 (anonymous) @ main.dart.js:4790 childList (async) $1 @ main.dart.js:56868 bLJ @ main.dart.js:6196 bsA @ main.dart.js:6304 qE @ main.dart.js:58118 axv @ main.dart.js:57326 jM @ main.dart.js:57324 bs @ main.dart.js:57239 e0 @ main.dart.js:57240 $1 @ main.dart.js:44312 bZM @ main.dart.js:4661 c4c @ main.dart.js:41751 (anonymous) @ main.dart.js:41747 load (async) ap @ main.dart.js:8768 e8 @ main.dart.js:428 c4G @ main.dart.js:205 (anonymous) @ main.dart.js:190 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 btT @ main.dart.js:197 (anonymous) @ main.dart.js:45812 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 cL @ main.dart.js:45817 (anonymous) @ main.dart.js:50392 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 $0 @ main.dart.js:50396 (anonymous) @ main.dart.js:1366 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 c8v @ main.dart.js:1370 buG @ main.dart.js:1351 (anonymous) @ main.dart.js:62444 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 am9 @ main.dart.js:62446 $1 @ main.dart.js:62436 $0 @ main.dart.js:62437 (anonymous) @ main.dart.js:43527 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 xL @ main.dart.js:43531 (anonymous) @ main.dart.js:8876 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 bwh @ main.dart.js:8884 (anonymous) @ main.dart.js:41732 (anonymous) @ main.dart.js:6001 $2 @ main.dart.js:56922 m @ main.dart.js:5987 bv6 @ main.dart.js:41734 (anonymous) @ main.dart.js:161133 (anonymous) @ main.dart.js:161127 dartProgram @ main.dart.js:161130 (anonymous) @ main.dart.js:161133 Show 50 more frames main.dart.js:41898 devtools server not available (404) main.dart.js:41898 DevTools version 2.20.1. main.dart.js:41898 Attempted to call extension 'ext.flutter.inspector.structuredErrors', but no service with that name exists

SalomeViz avatar Feb 15 '23 17:02 SalomeViz

@SalomeViz thank you for forwarding that information, unfortunately there isn't anything specific that points to why this might be failing right now.

Out of curiosity does your inspector go blank as soon as you open it immediately? Or is it perhaps after clicking the inspect button? Or perhaps otherwise is there a certain type of object you are inspecting that is causing this?

Any extra information on how you reproduce this would be helpful for me. I still haven't found a way to reproduce it myself yet.

CoderDake avatar Feb 15 '23 21:02 CoderDake

Don't really have any extra information on reproducing this, just stopped working after downgrading from 3.7 to 3.3.0

Something that might be able to help is a temporary fix that I found.

-After running the app and opening widget inspector in VSC (widget tree still empty) -Use command + shift + p -Write Open DevTools -Select Open DevTools in web browser -When this loads on the web browser, it also loads on VSC

When I rerun the app it shows empty again, but do this steps again and works fine util I stop running, again. Hope this could lead to a solution. 🤞

SalomeViz avatar Mar 17 '23 20:03 SalomeViz

Hi @SalomeViz. This might be a caching issue. Could you try clearing the DevTools site cache:

  • Open up Chrome DevTools for the Flutter DevTools in the web browser
  • Go to Application > Storage > and choose "Clear site data"
  • Refresh Flutter DevTools

Let me know if that works! Thank you

elliette avatar Mar 17 '23 23:03 elliette

@elliette still the same :/

SalomeViz avatar Mar 27 '23 16:03 SalomeViz

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!

github-actions[bot] avatar May 31 '23 00:05 github-actions[bot]

Our workflows erroneously closed this. Re-opening it.

CoderDake avatar Jun 01 '23 12:06 CoderDake

DevTools version: 2.25.0. Connected Device: CPU / OS: ia32 (32 bit) android Dart Version: 3.1.4 Flutter Version: 3.13.8 / stable Framework / Engine: 6c4930c4ac / 767d8c75e8 Connected app type: Flutter native (debug build)

Still same issue

Deemon47 avatar Oct 23 '23 10:10 Deemon47

@Deemon47 could you please open an issue with any errors you find in the Developer Tools console in vscode?

CoderDake avatar Oct 23 '23 14:10 CoderDake

Same issue vscode-app-1729092169412.log

Lurchfresser avatar Oct 16 '24 15:10 Lurchfresser

Image

same issue main.dart.js:61194 GET http://127.0.0.1:9100/inspector/api/ping 404 (Not Found) main.dart.js:61194 GET http://127.0.0.1:9100/inspector/api/ping 404(未找到)

I use Cursor

AkaShark avatar Mar 13 '25 08:03 AkaShark

CC @DanTup

kenzieschmoll avatar Mar 17 '25 18:03 kenzieschmoll

@AkaShark can you confirm which version of Flutter you're using, and whether this repros also in VS Code, or only Cursor?

DanTup avatar Mar 17 '25 18:03 DanTup

@AkaShark can you confirm which version of Flutter you're using, and whether this repros also in VS Code, or only Cursor?

I use the 3.0.5 version of Flutter, I didn't have this issue before, but it started suddenly. I tried VS Code, which has the same

AkaShark avatar Mar 18 '25 01:03 AkaShark

I use the 3.0.5 version of Flutter

This is a very old version of Flutter (from July 2022) and no longer supported (either by the Flutter team or by the latest version of the Dart VS Code extension). Can you check this is definitely the version being loaded, and if so, could you try upgrading to the latest (3.29.2 from March 2025) and re-test the issue?

Thanks!

DanTup avatar Mar 18 '25 10:03 DanTup

Ok thanks, I'll try the latest version, but our business has no plans to upgrade Flutter recently 😂

AkaShark avatar Mar 18 '25 11:03 AkaShark

@AkaShark that's a shame. Unfortunately no fixes can be made to 3.0.5 of Flutter, nor the version of DevTools that was shipped with it, so even if the issue isn't already fixed, any fix would only apply to newer versions of Flutter.

You could try opening DevTools outside of VS Code to see if that works - if it does, you can change the VS Code settings so that it always opens externally instead of embedded.

DanTup avatar Mar 18 '25 11:03 DanTup

@AkaShark that's a shame. Unfortunately no fixes can be made to 3.0.5 of Flutter, nor the version of DevTools that was shipped with it, so even if the issue isn't already fixed, any fix would only apply to newer versions of Flutter.遗憾的是,无法对 Flutter 3.0.5 及其随附的 DevTools 版本进行修复,因此即使问题尚未解决,任何修复也只会应用于 Flutter 的新版本。

You could try opening DevTools outside of VS Code to see if that works - if it does, you can change the VS Code settings so that it always opens externally instead of embedded.您可以在 VS Code 之外打开 DevTools,看看是否可行——如果可行,您可以更改 VS Code 设置,使其始终在外部打开而不是嵌入。

Okay, I understand this. Thanks for your reply. It should be our own reason. Now, I'm temporarily using DevTools in Chrome.

AkaShark avatar Mar 18 '25 13:03 AkaShark

Still reproducible in Flutter version 3.32.0. The progress indicator keeps loading indefinitely. I have to stop the project and run it again to resolve the issue temporarily.

@DanTup

Image

muhammadkamel avatar May 24 '25 15:05 muhammadkamel

@muhammadkamel this issue was about running embedded within VS Code, but from your screenshot I think you're running it in a browser window? If so, this might be a different problem and is probably best filed in a new issue. If you have steps and/or a project that reliably reproduces the issue, please include that in the issue. Thanks!

DanTup avatar May 27 '25 14:05 DanTup