我有一个Blazor Web组件项目,其中包含多个应用程序。我是Blazor的新手,我的问题是如何调试wasm.core中的文件。我试过在Chrome中调试的方法[ALT + SHIFT + D],但没有文件显示在f12检查中。整个项目没有launchSettings.json文件。
知道怎么调试文件吗
debug the page on wasm.core
debug the services on wasm.core的
我有一个Blazor Web组件项目,其中包含多个应用程序。我是Blazor的新手,我的问题是如何调试wasm.core中的文件。我试过在Chrome中调试的方法[ALT + SHIFT + D],但没有文件显示在f12检查中。整个项目没有launchSettings.json文件。
知道怎么调试文件吗
debug the page on wasm.core
debug the services on wasm.core的
1条答案
按热度按时间czq61nw11#
我能够调试剃刀文件的代码部分:
的数据
首先,在打开解决方案后,应重新生成launchSettings.json文件。如果没有重新生成,可以手动添加此文件,可以将以下内容添加到launchSettings.json中:
字符串
launchSettings.json文件的结构:
的
在此之后,您需要在打开的网站中执行一些交互操作以进入代码(什么样的交互由您正在编写的代码确定)。
顺便说一下,要选择要调试的启动项目,可以右键单击该项目,然后单击“设置为启动项目”:
的
之后,如果您按f5,您将开始调试项目。
有关更多信息,您可以参考此官方文档:
Debug ASP.NET Core Blazor WebAssembly