Skip to content

Unable to open static DevTools extensions on current Flutter beta #5208

@DanTup

Description

@DanTup

Using the current Flutter beta and opening the app_that_uses_foo project, the sidebar shows the extension but fails to launch if there is not debug session.

This is because the requiresDebugSession flag defaults to true (sidebar does not currently pass it) unless we know that the target is a static page (which we only do for 1p pages, because they are hard-coded into Dart-Code).

As a workaround until sidebar is passing the flags, we should:

  • if the target page is an _ext page and neither requiresDebugSession or prefersDebugSession are explicitly set
  • downgrade from requiresDebugSession to prefersDebugSession

This fixes the issue, but there are some side-effects or doing this:

  1. Attempting to launch a static tool when there are > 1 debug sessions active will prompt the user to select one (even though the tool won't use it)
  2. Attempting to launch a runtime tool when there are no active sessions will launch the tool without a connection (instead of doing nothing)

Discussing with @kenzieschmoll, the first is acceptable and the second should not generally happen because the sidebar disables the runtime tool buttons when it knows there are no active debug sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in devtoolsRelates to integration with Dart/Flutter DevToolsin flutter sidebarRelates to something in the "Flutter sidebar" that's provided via DevToolsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions