调试Typescript在VS中有效,但在VS Code中无效

时间:2019-01-25 07:04:28

标签: angular visual-studio visual-studio-code single-page-application

我使用Angular模板创建了一个ASP.NET Core Web应用程序。

当我尝试在Visual Studio Code中调试时,我的断点没有被击中,当我将它们悬停在IDE中时,它会显示“未验证的断点”。
但是,当我使用Visual Studio时,一切都按预期工作,就会遇到断点。

我在“未验证的断点”上也遇到过类似的问题,但是我还没有解决。

我的launch.json(来自其Git Hub)

"configurations": [
    {
        "justMyCode": true,          
         "name": ".NET Core Launch (web)",
         "type": "coreclr",
         "request": "launch",
         "preLaunchTask": "build",
         "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/Foo.Web.Shell.Angular.dll",
         "args": [],
         "cwd": "${workspaceFolder}",             
         "stopAtEntry": false,
         "internalConsoleOptions": "openOnSessionStart",
         "launchBrowser": {
             "enabled": true,
             "args": "${auto-detect-url}",
             "windows": {
                 "command": "cmd.exe",
                 "args": "/C start ${auto-detect-url}"
             }
         },
         "env": {
             "ASPNETCORE_ENVIRONMENT": "Development"
         }
     },
     {
        "type": "chrome",
        "request": "launch",
        "name": "Chrome",
        "url": "${auto-detect-url}",
        "webRoot": "${workspaceFolder}/ClientApp"
    }         
 ],
  "compounds": [
     {
         "name": "Full stack",
         "configurations": [".NET Core Launch (web)", "Chrome"]
     }
 ]

我的task.json

{
"version": "2.0.0",
"tasks": [
    {
        "label": "build",
        "command": "dotnet",
        "type": "process",
        "args": [
            "build",
            "${workspaceFolder}/Foo.Web.Shell.Angular.csproj"
        ],
        "problemMatcher": "$msCompile"
    }
  ]
}

0 个答案:

没有答案