Open NTaylorMullen opened 5 years ago
I don't think this plan will work -- launch.json configurations need to be for both running and debugging and, at least the .NET Debugger, will not be able to work if you launch the problem using dotnet run
.
Hmmm interesting. Why is it that dotnet run
can't be debugged?
dotnet run
will launch the target in a child process. The .NET Debugging APIs have no support for child process debugging.
Actually, thinking more - this is a much bigger problem than just tweaking launch.json a little.
For a pure client app - what you want F5 to do is start the Blazor web server not under a debugger, and then after it is ready, launch Chrome (or whatever supported web browser), and connect the Chrome debug adapter to it.
For a 'Blazor (ASP.NET Core hosted)' app it might make sense to debug both at the same time.
I see I see, ya good point. @SteveSandersonMS / @danroth27 is Blazor debugging in the browser in a viable/workable state?
@NTaylorMullen Debugging Blazor in the browser is still pretty rough. Eventually though we do want to have an integrated experience where you can just F5 and have VS launch the browser with remote debugging enabled and then correctly attach.
For comparison, in VS we also don't support F5 for client-side Blazor apps. You have to Ctrl-F5, and it's been that way for over a year now.
Here are my suggestions:
dotnet watch
task.
This was originally reported over in https://github.com/aspnet/AspNetCore/issues/9451 and it seems that the dialog to add build assets to the project can't detect Blazor client side applications because they're not true runnable applications on their own.
To fix this there's two steps:
dotnet run --no-build
instead ofdotnet *.dll
. The distinction about usingdotnet run
enables the Blazor project to hijack the run process and properly boot a runnable application./cc @danroth27