【问题标题】:Debug Test in Dotnet xUnit does not break at BreakpointDotnet xUnit 中的调试测试不会在断点处中断
【发布时间】:2017-01-03 18:01:10
【问题描述】:

我正在使用 dotnet core、VS Code 和 xUnit 进行测试。

我可以运行测试,但是当我尝试调试测试时,它没有在断点处中断?

我需要做什么才能让它在断点处中断?

【问题讨论】:

    标签: visual-studio-code xunit


    【解决方案1】:

    好的,找到问题了。我正在使用不支持 Windows PDB 的跨平台 .NET Core 调试器。

    通过将 project.json 更改为包含 "debugType":"portable" 可以轻松解决此问题

    "buildOptions": {
      "emitEntryPoint": true,
      "preserveCompilationContext": true,
      "debugType": "portable"
    },
    

    【讨论】:

      猜你喜欢
      • 2014-10-29
      • 2018-01-11
      • 2023-03-12
      • 2023-03-12
      • 2018-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-23
      相关资源
      最近更新 更多