I know it’s not currently support due to Licensing but it’s a real pain to jump outside of the IDE to do my debugging for .NET projects.
Hey,
Can you explain more on what workflow you have that is causing you to jump our of Cursor and into (I assume) Visual Studio?
Are the features here, offered by both VSCode and Cursor, not sufficient for your use: Debugging C# in Visual Studio Code
Thanks
FYI the C# extensions are proprietary to VS Code and do not work in Cursor.
There is this extension available, but I haven’t tried it yet: Open VSX Registry
I do not see any extensions from the MSFT marketplace when I search inside Cursor, so not sure how our settings differ for you to see it.
I did click that “Don’t see an extension…” link and was able to install the official C# extensions via that method: How to Install Any VSCode Extension and they seem to be working fine.
Ah, sorry about that! Don’t have a good solution for you then, but I’ll log this down so we can see if we can give it working in a future update!
not 100% true, you can make work around to fool it into working, it just a pain ever time cursor is updated
We just released our own C# extension, which uses the open-source netcoredbg debugger. You can get find it by searching for @id:anysphere.csharp
in the extension marketplace – attaching a screenshot. Please post if you continue to hit issues with the debugger on this one!
This is a great step! But I’m not able to get the debugger to work properly.
This is my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/server/examples/ApiUsageExamples/bin/Debug/net8.0/ApiUsageExamples.dll",
"args": [],
"cwd": "${workspaceFolder}/server/examples/ApiUsageExamples",
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}
It launches the debug console but I can’t input with stdio in terminal if I put integratedTerminal as console?
Unfortunately it looks like this is an issue with netcoredbg
itself – How to pass input to the console in vscode mode · Issue #80 · Samsung/netcoredbg · GitHub.
I would suggest switching to an “attach” configuration, where you build + launch the program as a pre-launch task. Alternatively, depending on your program, would it be easy to swap reading from stdin with reading from another file or socket instead when debugging (that you could then write to from another terminal?)
I realize that neither of these are elegant, but hope that one of these strategies can unblock you!
Thanks @ravirahman for the response and the link to the GH issue. I will definitely try those suggestions out!
How to debug with unity now?
Have you had any luck with this? And how did you change your launch.json?
I can’t download this extension