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
{{ message }}
Repository navigation
dart.openDevTools setting ignores embedded flag and always opens in a browser #3246
As I know, embedded Dev Tools are enabled by default. From my observations, for Windows device embedded Dev Tools are opened inside VSCode windows, but for Web/Chrome device Dev Tools always opened in browser even if I explicitly set dart.embedDevTools to true explicitly.
What is desired behavior? Should embedded Dev Tools not open for Web device or this my be caused by some environment configuration on my machines (iItested on home and work PC)?
There should be no difference with web/desktop, it's all the same code. I'm unable to reproduce this though - it behaves the same with both web and non-web devices. Can you provide the exact steps you're taking when you're seeing it launch in a browser? Thanks!
It seems I figured this out a bit: actually the problem is not related to device being used. On my machine I had global VSCode setting
"dart.openDevTools": "always"`
Once I removed this setting and started opening Dev Tools manually through VSCode command palette (Flutter: Open Dev Tools) when having active debug session - everything started working just fine.
So the problem only happening in my environment only if I ask VSCode to start Dev Tools automatically. Not sure if this is a desired behavior or still some issue in my environment.
Turns out this was done consciously, although it could probably be done better. The issue is that when opening embedded windows, we can only show a single page - and it's not clear if you say "launch DevTools automatically" which page you want.
So, I've changed this slightly. If you don't have embedded DevTools enabled, everything works the same (it spawns a browser window). If you do have embedded DevTools enabled, we assume that if you've enabled launching DevTools automatically you want the Inspector, and will launch that embedded for Flutter apps. For non-Flutter apps, we'll continue to spawn in the browser (since it's less clear which page you'd want).
changed the title [-]Open Embedded Flutter Dev Tools for Web application?[/-][+]dart.openDevTools setting ignores embedded flag and always opens in a browser[/+]on Apr 6, 2021
Activity
DanTup commentedon Apr 1, 2021
There should be no difference with web/desktop, it's all the same code. I'm unable to reproduce this though - it behaves the same with both web and non-web devices. Can you provide the exact steps you're taking when you're seeing it launch in a browser? Thanks!
roman-petrov commentedon Apr 1, 2021
It seems I figured this out a bit: actually the problem is not related to device being used. On my machine I had global VSCode setting
Once I removed this setting and started opening Dev Tools manually through VSCode command palette (
Flutter: Open Dev Tools) when having active debug session - everything started working just fine.So the problem only happening in my environment only if I ask VSCode to start Dev Tools automatically. Not sure if this is a desired behavior or still some issue in my environment.
DanTup commentedon Apr 6, 2021
@roman-petrov aha, thanks! I can repro, and it's not intended.
roman-petrov commentedon Apr 6, 2021
@DanTup thank you for great product & support!
DanTup commentedon Apr 6, 2021
Turns out this was done consciously, although it could probably be done better. The issue is that when opening embedded windows, we can only show a single page - and it's not clear if you say "launch DevTools automatically" which page you want.
So, I've changed this slightly. If you don't have embedded DevTools enabled, everything works the same (it spawns a browser window). If you do have embedded DevTools enabled, we assume that if you've enabled launching DevTools automatically you want the Inspector, and will launch that embedded for Flutter apps. For non-Flutter apps, we'll continue to spawn in the browser (since it's less clear which page you'd want).
[-]Open Embedded Flutter Dev Tools for Web application?[/-][+]dart.openDevTools setting ignores embedded flag and always opens in a browser[/+]roman-petrov commentedon Apr 6, 2021
seems to be a good workaround, thank you!