Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launch DebugProxy from IDE not runtime #21466

Closed
danroth27 opened this issue May 4, 2020 · 7 comments
Closed

Launch DebugProxy from IDE not runtime #21466

danroth27 opened this issue May 4, 2020 · 7 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-debugging This issue is related to debugging of Blazor WebAssembly apps feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Milestone

Comments

@danroth27
Copy link
Member

danroth27 commented May 4, 2020

If you create a default ASP.NET Core hosted Blazor WebAssembly app and set the environment to Production then debugging will fail. The reason is obvious: the app.UseWebAssemblyDebugging() call is within a Development environment check. But the user experience is a bit unexpected. Visual Studio will still happily try to debug the Blazor WebAssembly app and will fail to connect to the non-existent debugging endpoint after a lengthy timeout:

image

This seems like it could be surprising to users. It seems reasonable to want to be able to debug your Blazor WebAssembly app even when you've set the environment to Production. We certainly support this for in general for ASP.NET Core apps, and it also works fine with standalone Blazor WebAssembly apps where the debugging endpoint is handled by the dev server.

Is there a way that we could externalize the debugging endpoint from the app so that it isn't impacted by debugging at all?

@timheuer

@Pilchie Pilchie added the area-blazor Includes: Blazor, Razor Components label May 4, 2020
@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label May 5, 2020
@mkArtakMSFT mkArtakMSFT added this to the Next sprint planning milestone May 5, 2020
@mkArtakMSFT mkArtakMSFT added the feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly label May 5, 2020
@mkArtakMSFT mkArtakMSFT changed the title Debugging an ASP.NET Core hosted Blazor WebAssembly app in Production environment fails Launch DebugProxy from IDE not runtime May 15, 2020
@mkArtakMSFT mkArtakMSFT added the Needs: Design This issue requires design work before implementating. label May 15, 2020
@captainsafia captainsafia self-assigned this May 20, 2020
@captainsafia
Copy link
Member

I can take a look at this. I have a pretty firm idea of how we'll accomplish this when debugging from VS Code.

I'll need to do some research into VS's debugging APIs to understand how things work there and how we might unify the two approaches.

@captainsafia captainsafia added Done This issue has been fixed Working and removed Done This issue has been fixed labels May 27, 2020
@mkArtakMSFT mkArtakMSFT added the feature-blazor-debugging This issue is related to debugging of Blazor WebAssembly apps label Jun 5, 2020
@captainsafia
Copy link
Member

captainsafia commented Jun 5, 2020

Removing the Needs Design label from this now that we've got a plan moving forward. This work will happen in the following steps.

We can approach this implementation incrementally based on the steps above.

During today's sync we also discussed consuming the MonoProxy as a package (#17948). This would be a nice improvement but it doesn't totally block work on this feature so I haven't included it in the list below.

@captainsafia captainsafia removed Needs: Design This issue requires design work before implementating. Working labels Jun 5, 2020
@gp2-gp2
Copy link

gp2-gp2 commented Jun 8, 2020

As this is closed -> #20597 and we were redirected to this issue can I ask what is the solution for issue 20597? Right now there is no way to develop under Linux any Blazor hosted app and successfully debug it.

@captainsafia
Copy link
Member

@gp2-gp2 Debugging in Linux (Ubuntu, Mint, etc) should work. Debugging under WSL (Windows Subsystem for Linux) is currently not working. If you're having trouble debugging on Linux, please open another issue with a description of the problem.

@elylv
Copy link

elylv commented Jun 24, 2020

Is there a workaround for this? I am currently totally unable to debug the client in Visual Studio 2019 (even after switching back to Anonymous Authentication). Just get timeouts on the debug adapter.

@captainsafia
Copy link
Member

@elylv Unfortunately, there's not a workaround.

Based on the details you've given, it looks like you're running into an unrelated issue we've been working through with timeouts during debugging.

I'd recommend opening a new issue with any helpful details you can include (screenshots, error messages, etc) so that we can track it under #23473.

@mkArtakMSFT
Copy link
Member

Closing as a dupe of #22589

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Jul 28, 2020
@ghost ghost added the Status: Resolved label Jul 28, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Aug 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-debugging This issue is related to debugging of Blazor WebAssembly apps feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

6 participants