c# - ASP.NET Core 项目中未命中断点
问题描述
我在调试 ASP.NET Core 项目时遇到问题。这是关于https://github.com/jasontaylordev/CleanArchitecture的。您可以使用“dotnet run”启动它。我从“dotnet run waitfordebugger”开始。
这是主要方法的片段。该程序休眠 20 秒,以便我可以将 Visual Studio 附加到该进程。
public async static Task Main(string[] args)
{
if (args[0] == "waitfordebugger")
{
Thread.Sleep(20000); // Wait 20 Seconds
}
int i = 0;
i++;
我在 vs 中的“i++”处设置了一个断点,使用“dotnet run waitfordebugger”启动应用程序,并将 vs 附加到进程中。问题是没有命中断点。我收到这个警告:“断点当前不会被命中。没有为此文档加载任何符号。”。有任何想法吗?
解决方案
推荐阅读
- github - 采用 Azure devops 组织名称 - 使用此名称的 GitHub 组织
- javascript - 如何在 const 中执行 JS 计算?
- maven - 当我将 jsonb 添加到其中一个时,所有 servlet 都停止工作
- laravel-4 - $request->hasFile() 在上传照片时返回 false
- python - 指定范围内的输出元素
- react-native-draggable-flatlist - 如何实现两个可拖动的Flatlist
- javascript - ethereum web3js 如何导入“crypto-js”?
- sqlite - sqlite3 二进制数据类型
- python - 小鼠插补的运行时间估计?
- r - 有没有办法制作一个逻辑向量来查看向量的每个元素是否存在于另一个向量的所有元素中?