could you please describe/document how to get this debugger to work in cursor if it is still working with cursor? I tried bunch of different combinations but I am not able to get it to work. I would like to be able to debug a web api project and a console project either with dotnet 6 or 7 as close as possible to the debugging experience in vscode.
Here are the steps I followed:
On a clean IDE with no c# related extensions installed. I downloaded the latest version of this extension, extracted it and placed it under ${workspaceFolder}/netcoredbg.
Created a new project with dotnet new console. Added the following launch.json and tasks.json.
.vscode/tasks.json
```json:.vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/test.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/test.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/test.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
```
.vscode/launch.json
```json:.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console) with pipeline",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/net6.0/test.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": true,
"console": "internalConsole",
"internalConsoleOptions": "openOnSessionStart",
"logging": {
"diagnosticsLog": {
"protocolMessages": true
}
}
// tried with different versions of dotnet
// tried with & without this pipe transport
// tried building netcoredbg from source and using that
// tried downloading the latest release of netcoredbg and using that
// tried with the free c# extension and without it
// "pipeTransport": {
// "pipeCwd": "${workspaceFolder}",
// "pipeProgram": "bash",
// "pipeArgs": ["-c"],
// // tried with different debuggers including this extension, samsung
// "debuggerPath": "${workspaceFolder}/netcoredbg/netcoredbg"
// },
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
```
Hit Debug(console)
I tried different combinations with the pipe transport, dotnet version etc. but the result is the same, debugger opens and closes and nothing happens in between or debugger hangs without hitting any of my breakpoints.
Note that this configurations works on vscode or vscode insiders with the official c# extension.
Hello
could you please describe/document how to get this debugger to work in cursor if it is still working with cursor? I tried bunch of different combinations but I am not able to get it to work. I would like to be able to debug a web api project and a console project either with dotnet 6 or 7 as close as possible to the debugging experience in vscode.
Here are the steps I followed:
On a clean IDE with no c# related extensions installed. I downloaded the latest version of this extension, extracted it and placed it under
${workspaceFolder}/netcoredbg
.Created a new project with
dotnet new console
. Added the followinglaunch.json
andtasks.json
..vscode/tasks.json
```json:.vscode/tasks.json { "version": "2.0.0", "tasks": [ { "label": "build", "command": "dotnet", "type": "process", "args": [ "build", "${workspaceFolder}/test.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" }, { "label": "publish", "command": "dotnet", "type": "process", "args": [ "publish", "${workspaceFolder}/test.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" }, { "label": "watch", "command": "dotnet", "type": "process", "args": [ "watch", "run", "${workspaceFolder}/test.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" } ] } ```.vscode/launch.json
```json:.vscode/launch.json { "version": "0.2.0", "configurations": [ { "name": ".NET Core Launch (console) with pipeline", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "${workspaceFolder}/bin/Debug/net6.0/test.dll", "args": [], "cwd": "${workspaceFolder}", "stopAtEntry": true, "console": "internalConsole", "internalConsoleOptions": "openOnSessionStart", "logging": { "diagnosticsLog": { "protocolMessages": true } } // tried with different versions of dotnet // tried with & without this pipe transport // tried building netcoredbg from source and using that // tried downloading the latest release of netcoredbg and using that // tried with the free c# extension and without it // "pipeTransport": { // "pipeCwd": "${workspaceFolder}", // "pipeProgram": "bash", // "pipeArgs": ["-c"], // // tried with different debuggers including this extension, samsung // "debuggerPath": "${workspaceFolder}/netcoredbg/netcoredbg" // }, }, { "name": ".NET Core Attach", "type": "coreclr", "request": "attach", "processId": "${command:pickProcess}" } ] } ```Hit Debug(console)
I tried different combinations with the pipe transport, dotnet version etc. but the result is the same, debugger opens and closes and nothing happens in between or debugger hangs without hitting any of my breakpoints.
Note that this configurations works on vscode or vscode insiders with the official c# extension.