【发布时间】:2020-07-30 01:09:55
【问题描述】:
(我将 Visual Studio Code 称为 vscode)
我正在使用 .Net Core 2.2 开发 Asp.Net Mvc 项目。如果我打开 vscode 后不修改源代码,我可以在 vscode 中调试/运行项目,没有任何问题。但是我修改源代码后,如果我调试,vscode给我警告
Breakpoint warning: The source code is different from the original version. To allow this breakpoint to be hit: Add '"requireExactSource": false' to launch.json and restart debugging.
当我放置一个断点并自动禁用它时。我也看不到正在运行的项目中的最后更改。
为了能够看到最后的修改,我必须用 Visual Studio 调试一次,然后如果我再次用 vscode 调试/运行源代码,直到我再次修改源代码之前没有问题。
我该如何解决这种情况?
注意:有一个类似的问题here,但它说他/她不能使用断点,因为第一次运行并且问题与 dotnet 路径有关。我的问题完全不同。
【问题讨论】:
标签: c# debugging .net-core visual-studio-code