Skip to content

Instantly share code, notes, and snippets.

@CriDos
Last active September 16, 2024 07:38
Show Gist options
  • Save CriDos/60c020bf9f98009e6c6c322506518183 to your computer and use it in GitHub Desktop.
Save CriDos/60c020bf9f98009e6c6c322506518183 to your computer and use it in GitHub Desktop.
Debugging .NET Projects in Cursor with netcoredbg: launch.json Example
{
"version": "0.2.0",
"configurations": [
{
"name": "Client (Debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-client-debug",
"program": "${workspaceFolder}/Build/Debug/HardClient.exe",
"args": [],
"cwd": "${workspaceFolder}/Dist",
"console": "internalConsole",
"stopAtEntry": false,
"justMyCode": false,
"logging": {
"moduleLoad": false
}
},
{
"name": "Server (Debug)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-server-debug",
"program": "${workspaceFolder}/Build/Debug/HardServer.exe",
"args": [],
"cwd": "${workspaceFolder}/Dist",
"console": "internalConsole",
"stopAtEntry": false,
"justMyCode": false,
"logging": {
"moduleLoad": false
}
},
{
"name": "Client (netcoredbg)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-client-debug",
"program": "${workspaceFolder}/Build/Debug/HardClient.dll",
"args": [],
"cwd": "${workspaceFolder}/Dist",
"console": "internalConsole",
"stopAtEntry": false,
"justMyCode": false,
"logging": {
"moduleLoad": false
},
"internalConsoleOptions": "openOnSessionStart",
"pipeTransport": {
"pipeProgram": "cmd",
"pipeArgs": ["/c"],
"debuggerPath": "${env:NETCOREDBG_PATH}/netcoredbg.exe"
}
},
{
"name": "Server (netcoredbg)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-server-debug",
"program": "${workspaceFolder}/Build/Debug/HardServer.dll",
"args": [],
"cwd": "${workspaceFolder}/Dist",
"console": "internalConsole",
"stopAtEntry": false,
"justMyCode": false,
"logging": {
"moduleLoad": false
},
"internalConsoleOptions": "openOnSessionStart",
"pipeTransport": {
"pipeProgram": "cmd",
"pipeArgs": ["/c"],
"debuggerPath": "${env:NETCOREDBG_PATH}/netcoredbg.exe"
}
},
],
"compounds": [
{
"name": "Server/Client (Debug)",
"configurations": [
"Server (Debug)",
"Client (Debug)"
]
},
{
"name": "Server/Client (netcoredbg)",
"configurations": [
"Server (netcoredbg)",
"Client (netcoredbg)"
]
}
]
}
@geomontgomery
Copy link

Thanks for sharing this launch.json. Could you also share your tasks.json, or share the build-client-debug and build-server-debug tasks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment