Skip to content

Tests named Foo<class> cannot be debugged from VSCode #4042

@timsneath

Description

@timsneath

Describe the bug
When running on Windows, the following test cannot be debugged from within VScode (by clicking the inline annotation):

  test('Find interfaces returns sane results with IEnumerable<class>', () {
    final winTypeDef = MetadataStore.getMetadataForType(
        'Windows.Media.Playback.PlaybackMediaMarkerSequence')!;

    final interfaces = winTypeDef.interfaces;
    expect(interfaces.length, equals(2));

    expect(interfaces.first.name, endsWith('IPlaybackMediaMarkerSequence'));
    expect(interfaces.last.typeSpec?.typeArg?.name,
        endsWith('PlaybackMediaMarker'));
  });

The debug console prints:

Connecting to VM Service at http://127.0.0.1:52148/GUWXcX9eYY8=/ws
No tests match regular expression "^Find interfaces returns sane results with IEnumerable^<class^>( \(variant: .*\))?$".
Exited (79)

When I rename the test to

  test('Find interfaces returns sane results with IEnumerable class ', () {
  ...
  });

the test is debugged.

For clarity, I'm executing the test by pressing the Debug button here:
image

Please complete the following information:

  • Operating System and version: Windows 10.0.19044.1806
  • VS Code version: 1.68.1
  • Dart extension version: 3.42.1
  • Dart/Flutter SDK version: from Flutter 3.1.0-9.0.pre

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions