在Visual Studio代码中调试dotnet角度模板Web应用程序

时间:2017-04-09 17:22:44

标签: visual-studio-code omnisharp

我正在尝试在VS Code中调试Web应用程序。我使用dotnet new angular创建了应用程序。我将此应用程序添加到解决方案中。应用程序构建并运行得很好。我可以通过附加到它来调试应用程序。但是当我尝试在调试模式下运行应用程序时,我得到以下异常:

  

抛出异常:'System.AggregateException'   System.Private.CoreLib.ni.dll

作为一个完整性检查,我在解决方案中添加了一个控制台应用程序并尝试对其进行调试。调试控制台应用程序工作得很好。那么我尝试创建一个像这样的dotnet核心mvc:

dotnet new mvc -n try-me -o try-me

我添加了一个启动配置,它调试就好了。所以这看起来可能只是角度模板的问题。有没有其他人得到这个模板进行调试?这是我的launch.json。 “.NET Core Launch(web)”的配置是有问题的。

{
"version": "0.2.0",
"configurations": [   

    {
        "name": ".NET Core Launch (console)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/jollies/bin/Debug/netcoreapp1.1/jollies.dll",
        "args": [],
        "cwd": "${workspaceRoot}",
        "stopAtEntry": false,
        "console": "internalConsole"
    },
    {
        "name": ".NET Core Launch (web)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/cars-webapp/bin/Debug/netcoreapp1.1/cars-webapp.dll",
        "args": [],
        "cwd": "${workspaceRoot}/cars-webapp",
        "stopAtEntry": false,
        "launchBrowser": {
            "enabled": true,
            "args": "${auto-detect-url}",
            "windows": {
                "command": "cmd.exe",
                "args": "/C start ${auto-detect-url}"
            },
            "osx": {
                "command": "open"
            },
            "linux": {
                "command": "xdg-open"
            }
        },
        "env": {
            "ASPNETCORE_ENVIRONMENT": "Development"
        },
        "sourceFileMap": {
            "/Views": "${workspaceRoot}/Views"
        }
    },
    {
        "name": ".NET Core Launch (web-try me)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/try-me/bin/Debug/netcoreapp1.1/try-me.dll",
        "args": [],
        "cwd": "${workspaceRoot}/try-me",
        "stopAtEntry": false,
        "launchBrowser": {
            "enabled": true,
            "args": "${auto-detect-url}",
            "windows": {
                "command": "cmd.exe",
                "args": "/C start ${auto-detect-url}"
            },
            "osx": {
                "command": "open"
            },
            "linux": {
                "command": "xdg-open"
            }
        },
        "env": {
            "ASPNETCORE_ENVIRONMENT": "Development"
        },
        "sourceFileMap": {
            "/Views": "${workspaceRoot}/Views"
        }
    },
    {
        "name": ".NET Core Attach",
        "type": "coreclr",
        "request": "attach",
        "processId": "${command:pickProcess}"
    }
]

}

0 个答案:

没有答案