enkodellc / blazorboilerplate

Blazor Boilerplate / Starter Template with MudBlazor
MIT License
1.87k stars 368 forks source link

Debug ASP.NET Core Blazor WebAssembly not working for blazorboilerplate #264

Open andrusyshynnikita opened 4 years ago

andrusyshynnikita commented 4 years ago

I would like to debug the WebAssembly using Visual Studio(https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-3.1), but debugging not working.
I need suggestions.

GioviQ commented 4 years ago

You need Visual Studio 16.6 preview

Ref.:https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-3-release-now-available/

enkodellc commented 4 years ago

@GioviQ I actually cannot get it to debug either. @GioviQ are you able to?

-VS 16.6

GioviQ commented 4 years ago

At the moment I am not using the preview release of VS.

andrusyshynnikita commented 4 years ago

You need Visual Studio 16.6 preview

Ref.:https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-3-release-now-available/

I am trying to update my Blazor WebAssembly to 3.2.0 preview 2 and get error

Severity    Code    Description Project File    Line    Suppression State
Error       Duplicate base paths '/' for content root paths 'D:\Projects\JobDocs\JD.CommonUI\wwwroot\' and 'D:\Projects\JobDocs\JD.Client\bin\Debug_CSB\netstandard2.1\wwwroot\'. ('D:\Projects\JobDocs\JD.CommonUI\wwwroot\css\bootstrap\bootstrap.min.css', 'D:\Projects\JobDocs\JD.Client\obj\Debug_CSB\netstandard2.1\blazor\linker\BlazorComponentUtilities.dll')  JD.Client   C:\Program Files\dotnet\sdk\3.1.201\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Microsoft.NET.Sdk.Razor.StaticWebAssets.targets   195 

Could you help me, please?

enkodellc commented 4 years ago

@andrusyshynnikita - https://github.com/dotnet/aspnetcore/issues/19795

enkodellc commented 4 years ago

@andrusyshynnikita Full disclosure I am still having issues with debugging. Someone mentioned use the latest Edge browser. Didn't work for me but might for you. I will post when I can get it working for me.

Check out Dan Roth's response: https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-now-available/#comment-2152

GioviQ commented 4 years ago

Sometimes works, see https://github.com/dotnet/aspnetcore/issues/20427

After upgrade to Visual Studio 16.6 I have to comment inspecturi for Debug_SSB.

GioviQ commented 4 years ago

I am watching Daniel Roth (the Blazor creator) in https://www.youtube.com/watch?v=XoizucRjxgU debugging C# directly in Chrome.

enkodellc commented 4 years ago

I was able to debug with MS Blazor WebAssembly default template. I am not sure but maybe we cannot debug because our pages are in the CommonUI folder?

-Update: I removed the CommonUI and tried and it still would not debug.. I think I might try a very fresh copy of the Template and start adding BB code to see where it breaks..

isc30 commented 4 years ago

Debugging doesnt work when DLLs are loaded through AssemblyLoadContext.Load() or AppDomain.Load()