yoDon / electron-dotnet

Boilerplate for Electron .NET apps (combining C# with Electron, Typescript, and React)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Included launch.json doesn't work for debugging in vs code

Saltallica opened this issue · comments

commented

Another way to debug the .net core backend is directly from VS Code. The included launch.json file is pointing to the wrong folders for the application (dotnetcore vs dotnet) and the DLL to attach to (should be api.dll). The following updated launch.json has values corrected:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/dotnet/bin/Debug/netcoreapp2.1/api.dll",
            "args": ["--signingkey", "devkey"],
            "cwd": "${workspaceFolder}/dotnet",
            "stopAtEntry": false,
            "launchBrowser": {
                "enabled": true
            },
            "env": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "sourceFileMap": {
                "/Views": "${workspaceFolder}/Views"
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processId": "${command:pickProcess}"
        }
    ]
}