You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often want to click on a UI element and see the line of widget code where its defined.
Currently this is eminently doable but involves the following steps:
click "open devtools" button in debug bar
in Devtools click on "select widget mode" button
click on the widget I'm interested in the Flutter running app
switch back to VSCode window (I run Devtools not in embedded mode)
Remember to go back to Devtools to un-toggle "select widget mode" button
close devtools tab in web browser
It would be really nice if there was a single VSCode command palette command that I could use to do all of the above in one go, ie. select the cmd in the cmd palette, click on the widget I'm interested in the running app and then VSCode jumps to the relevant code line and exists out of "select widget mode".
The text was updated successfully, but these errors were encountered:
There are already commands for toggling this without needing DevTools:
I think that reduces this to two steps (plus clicking a widget). Adding an additional command that auto-cancels on the first selection doesn't seem like a bad idea though.
DanTup
changed the title
feature request: command to do usual show Widget in code procedure
Add a version of the Flutter: Inspect Widget command that auto-cancels on selection
Aug 8, 2022
Ok wow, @DanTup, I think I need to spend more time looking through all the commands provided by DartCode! as I completely missed this one! But yes having a setting that cancels on first selection would be perfect 🙏🏻 Thanks for updating the title, that pretty much is exactly what I'm after 👍🏻
I discovered the new DAPs don't support Inspect Widget correctly (that is, they don't navigate in the editor) so it makes sense to fix that (#4193) before tackling this, since it's possible the mechanism used for navigating will change a bit.
There's a new command "Flutter: Inspect Widget (Auto-Cancel after Selection)" that will cancel the widget selection mode 1s after you click a widget (the delay is because it will also remove the visible selection of the widget on the app, and it looks buggy to have it disappear immediately when you tap).
I often want to click on a UI element and see the line of widget code where its defined.
Currently this is eminently doable but involves the following steps:
It would be really nice if there was a single VSCode command palette command that I could use to do all of the above in one go, ie. select the cmd in the cmd palette, click on the widget I'm interested in the running app and then VSCode jumps to the relevant code line and exists out of "select widget mode".
The text was updated successfully, but these errors were encountered: