首页 > 解决方案 > Visual Studio 代码通过调试 lauching.json 消失断点

问题描述

        We need information, I try debugging process to Visual Studio Code and I use breakpoint after sample debugging breakpoint disappear:
        
  {
   // Use IntelliSense to find out which attributes exist for C# debugging
   // Use hover for the description of the existing attributes
   // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
   "version": "0.2.0",
   "configurations": [
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            // If you have changed target frameworks, make sure to update the program path.
            "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/DatingApp.API.dll",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
            "serverReadyAction": {
                "action": "openExternally",
                "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
            },
            "env": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views"
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ]
}
    

当我开始调试时,断点完全消失,我无法验证应用程序中的步骤。我将补充一点,我将 Postman 的数据作为记录发送到 sqlite 数据库,数据进入应用程序,但调试后我无法逐步看到它。

什么可能导致问题?

标签: c#asp.net

解决方案


听起来可能很愚蠢,但是您是否尝试过重命名文件?

我在使用 Node.js 时遇到了类似的问题,尝试重新安装 vscode,禁用调试器,但无法开始工作,但是当我更改文件名时,它工作了......


推荐阅读