Skip to content

DevTools extensions don't load for a test ran with flutter test or dart test #7183

@kenzieschmoll

Description

@kenzieschmoll
  • When running flutter test test/app_that_uses_foo_test.dart --start-paused , the package:foo DevTools extension does not load
  • When running flutter run test/app_that_uses_foo_test.dart --start-paused -d flutter-tester, the package:foo DevTools extension does load.

In the flutter test case, rootLibraryForMainIsolate is returning file:///var/folders/gf/14ctmb656m3100h5z857669800fv4z/T/flutter_tools.9i1YVt/flutter_test_listener.ASUv35/listener.dart, whereas in the flutter run case it returns the expected path to the test file.

Since we have DevTools extensions intended for test files (e.g. Patrol), we should fix this and cherry pick to stable.

CC @bkonyi @DanTup for any ideas you have on how we can get the proper root lib or isolate for the flutter test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1high priority issues at the top of the work list, actively being worked on.devtools extensionsIssues related to DevTools extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions