Skip to content

dart.openDevTools setting ignores embedded flag and always opens in a browser #3246

Closed

Description

@roman-petrov

Not sure if it's a bug or desired behavior.

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)?

Activity

  1. DanTup commented on Apr 1, 2021

    @DanTup
    Member

    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!

  2. added
    awaiting infoRequires more information from the customer to progress
    on Apr 1, 2021
  3. roman-petrov commented on Apr 1, 2021

    @roman-petrov
    Author

    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.

  4. DanTup commented on Apr 6, 2021

    @DanTup
    Member

    @roman-petrov aha, thanks! I can repro, and it's not intended.

  5. added
    in flutterRelates to running Flutter apps
    and removed
    awaiting infoRequires more information from the customer to progress
    on Apr 6, 2021
  6. added this to the v3.22.0 milestone on Apr 6, 2021
  7. roman-petrov commented on Apr 6, 2021

    @roman-petrov
    Author

    @DanTup thank you for great product & support!

  8. DanTup commented on Apr 6, 2021

    @DanTup
    Member

    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).

  9. 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
  10. roman-petrov commented on Apr 6, 2021

    @roman-petrov
    Author

    seems to be a good workaround, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions