如何通过附加到Chrome在带有VS的IIS上调试Blazor Webassembly? [英] How to debug Blazor Webassembly on IIS with VS by attaching to Chrome?
问题描述
我正在尝试通过将调试器附加到Chrome来在VS 2019中调试Blazor Webassembly(5.0.1)应用程序-我无法使用直接"从VS进行调试,因为我有一个带有多个模块"的模块化项目结构,(RCL)放置在不同的VS解决方案中
I am trying to debug a Blazor Webassembly (5.0.1) application in VS 2019 via attaching the debugger to Chrome - I can't use "direct" debugging from VS because I have a modular project structure with multiple "modules" (RCLs) placed in different VS solutions
到目前为止我尝试过的事情:
What I tried so far:
- 设置自己的IIS:调试正在运行的ASP.NET Core应用程序在IIS中
- 使用远程调试端口cmd启动Chrome:chrome --remote-debugging-port = 9222
将VS 2019连接到Chrome时,Console.WriteLines()将显示在VS输出窗口中,但没有命中断点(未加载任何符号)-"mono_wasm_runtime_ready"还会显示在输出中.
When attaching VS 2019 to Chrome, the Console.WriteLines() will show in VS output window, but no breakpoints are hit (no symbols loaded) - the "mono_wasm_runtime_ready" also shows up in the output.
发布时,我尝试使用调试"配置,以及"BlazorEnableCompression"设置为false-到目前为止没有任何效果.
When publishing, i tried with "debug" configuration, as well as "BlazorEnableCompression" set to false - nothing worked so far.
(我使用默认的blazor-webassembly项目模板进行了尝试,也无法正常工作)
(I tried this with the default blazor-webassembly project template, also didn't work)
我想念什么?该怎么办?
What am I missing? How can this be done?
推荐答案
我发现这与上面的任何内容都不相关-它只是一个调试错误":
I found out that this wasn't related to any of the things above - it's simply a "debugging bug":
未绑定断点何时使用某些属性/类在Blazor Webassembly中进行调试
https://github.com/dotnet/aspnetcore/issues/25380
我替换了属性中的enums参数,并且现在可以正常使用
I replaced the enums parameters in the attribues and it's working now
这篇关于如何通过附加到Chrome在带有VS的IIS上调试Blazor Webassembly?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!