Skip to content

Add an option to show coverage of failing tests #3921

@myaaaaaaaaa

Description

@myaaaaaaaaa

VS Code can show code coverage in the editor. Here is an example:

Image

Right now, vscode-go only uses this feature for package-level tests, to show which lines of code aren't being covered by the test suite.

I would like an option to automatically rerun failing tests with coverage enabled upon test failure, which should make them easier to debug by automatically highlighting which lines of code likely caused the failure. An article by Russ Cox on this technique, differential coverage, is available here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions