问题描述
我正在尝试通过将调试器附加到 Chrome 来调试 VS 2019 中的 Blazor Webassembly (5.0.1) 应用程序 - 我无法使用来自 VS 的“直接”调试,因为我有一个包含多个“模块”的模块化项目结构(RCL) 放置在不同的 VS 解决方案中
到目前为止我尝试过的:
- 设置自己的 IIS:Debugging ASP.NET Core applications running in IIS
- 使用远程调试端口 cmd 启动 Chrome:chrome --remote-debugging-port=9222
将 VS 2019 附加到 Chrome 时,Console.WriteLines() 将显示在 VS 输出窗口中,但未命中断点(未加载符号)-“mono_wasm_runtime_ready”也显示在输出中。
发布时,我尝试使用“调试”配置,并将“BlazorEnableCompression”设置为 false - 到目前为止没有任何效果。
(我用默认的 blazor-webassembly 项目模板试过这个,也没有用)
我错过了什么?这怎么办?
解决方法
我发现这与上述任何事情都没有关系 - 这只是一个“调试错误”:
Unbound breakpoints when debugging in Blazor Webassembly when using certain attributes/classes
https://github.com/dotnet/aspnetcore/issues/25380
我替换了属性中的枚举参数,现在可以使用了