Skip to content

VS Code: Code Lens shown in weird place #15618

@afscrome

Description

@afscrome

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The code lens for running resources is sometimes showing up in weird spots. Take the following for example

Image

Expected Behavior

I'd expect the code lens to be immediately on the line above the builder.AddContainer() call, not within the if statement above it.

Steps To Reproduce

Add the following code, to an app host in VS Code, then run the app host with the extension

if (false)
{
	throw new Exception("This should not work");
}

builder.AddContainer("nginx", "nginx");

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions