Skip to content

VS Code - Debug doesn't work if app host fails before build #15578

@afscrome

Description

@afscrome

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

If you have an app host that fails before it gets built, the VS Code extension doesn't clearly highlight there was an error.
Image

Expected Behavior

Whilst there is a warning, it doesn't really tell you what the problem is, I'd expect an error in red text, and including the stack trace from the app host (about the duplicate resource name)

Steps To Reproduce

Take the below app host that fails because I try to add two resources with the same name

Run it in via dotnet run, and you'll you'll break very clearly on the second line.

Run it via VS Code, and you don't get any indication

var builder = DistributedApplication.CreateBuilder(args);

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

using var app = builder.Build();

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions