Skip to content

Test gutter icons appear in wrong lines #4586

Closed
@Snonky

Description

@Snonky

Describe the bug
The gutter icons in test files appear in the wrong lines. This also affects the in-line stack trace boxes that pop up when a test fails.

To Reproduce
Steps to reproduce the behavior:

  1. create a fresh flutter project with the cli: flutter create new_project
  2. open VSCode and open the new_project folder
  3. Go to test/widget_test.dart
  4. Make a change to make the test fail (e.g. change the '0' to '1' in line 19)
  5. Run the test (by clicking on the inline run button)

Expected behavior
The gutter icon of the test should be at line 14 where the test is defined. The test's failure stack trace should also appear there.

Actual behavior
Instead the gutter icon is at line 31. It is consistent across VSCode and OS restarts,

Screenshots

grafik

grafik

This issue started happening to me since about 3 days ago. Regrettably I can't pin point it to updating something that might have broken it. I hope somebody who has a setup like mine can replicate it

Please complete the following information:

  • Operating System and version: Windows 10 Home, version 22H2, build 19045.2965
  • VS Code version: 1.79.1
  • Dart extension version: 3.66.0
  • Dart/Flutter SDK version: 3.0.2/3.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggerRelates to the debug adapter or process of launching a debug sessionin testingRelates to test execution of Dart/Flutter tests for end usersis bugon windowsrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions