Aspnetcore: Support debugging client-side Blazor from VS

Created on 3 Apr 2019  路  17Comments  路  Source: dotnet/aspnetcore

Components Big Rock Done area-blazor enhancement

Most helpful comment

Yes

All 17 comments

Is there a technical roadblock to this approach?

  1. Setup Visual Studio for remote debugging.
  2. Connect to the mono WASM runtime engine in the browser.
  3. Get all of the VS debugging capabilities "for free".

You'd need to use the browser debugger for debugging DOM, styles, etc., but everything else would be through Visual Studio.

@ejhewy It's extremely nontrivial but we are working on it (well, mostly the Mono team are). We don't get "all of the VS debugging capabilities for free" because each capability involves detailed work to make the runtime support and present in a form that the IDE can understand.

Is anyone else also having issue debugging on Chrome? I keep getting this error "Debugging connection was closed. Reason: WebSocket disconnected"
I followed the steps "https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.0" but no luck, keep getting the error. I have no extensions in Chrome.

image

Its off-topic, I know, just wanted to let @3x0dv5 know that I am getting the same problem with disconnected debugging. I think, however, that I saw some error in the output window, talking about the Blazor.Storage assembly I have referenced, and that it ran into some problem with that one.

Debugging in Chrome was working fine until I updated my project to use the Microsoft.AspNetCore.Blazor 3.0.0-preview5-19227-01 version.
It starts working again if I role back to preview4.
Anybody having the same issue?

@Fabian-at-VertiQ that seems to be in line with my issue. I do remember seeing it working a few months ago, and now I am using preview5 and seeing the problem. Looks like we have to wait a bit more, but will be worth it :)

Been using Blazor debugging the old way (console.writeline), updated to preview-7 so I decided to give another go to this debug from browser approach.
So this message "Debugging connection was closed. Reason: WebSocket disconnected" shows up when accessing the HTTPS version, it doesn't show when using HTTP.

I created a new project from scratch by using dotnet new blazor -o Bzdebug
When using HTTP I can switch the browser to debugging mode, but I cannot see any assembly in the sources tab.

@SteveSandersonMS Will this feature be included in the GA release of Blazor WebAssembly in May next year?

Yes

The Chrome DevTools recently announced support for directly debugging WASM against the original source via source maps and the DWARF format - I'm wondering if this is something worth trying to support as well, or if VS / VS Code debugging will make DevTools unnecessary?

I guess I'm assuming that the blazor-wasm tag indicates that Blazor client-side is meant to run directly as WASM instead of being interpreted and therefore without source maps, but don't see a more-relevant issue to post this to.

Any news on this one? Is it going to be released in next preview?

Can we use this with 3.2 preview 2? Is there any docs about it?

@xrkolovos this issue is about VS debug integration. The roadmap still lists it for "through June 2020"

Introduce Visual Studio support for Blazor Wasm debugging

Presumably, this requires a new VS preview, not just a Blazor update.

(edit)

As I understand it, VS integration is coming in preview 3, at the end of this month.

Thank you very much for you feedback

Any word on support in VS Code?

@ar0311 debugging from VS Code will also be possible when 3.2-Preview 3 will release As @chucker mentioned, it'll be closer to the end of the month.

Great, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TanvirArjel picture TanvirArjel  路  3Comments

rbanks54 picture rbanks54  路  3Comments

Kevenvz picture Kevenvz  路  3Comments

FourLeafClover picture FourLeafClover  路  3Comments

groogiam picture groogiam  路  3Comments