muhammadsammy / free-vscode-csharp

Free/Libre fork of the official C# extension for vscode
https://open-vsx.org/extension/muhammad-sammy/csharp
Other
110 stars 10 forks source link

Debugger Not Working in Cursor #65

Closed JokerBoom closed 6 months ago

JokerBoom commented 6 months ago

Version: 0.20.2 VSCode Version: 1.84.2 Commit: 33c8b08492b48664cb00a8ab054f2d60697bbf90 Date: 2023-12-19T02:08:30.362Z Electron: 25.9.2 ElectronBuildId: undefined Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631

use this tool https://cursor.sh/

muhammadsammy commented 6 months ago

Is it still not working with the latest version?

JokerBoom commented 6 months ago

working nice!thanks.

muhammadsammy commented 6 months ago

Thanks for checking!

dgokcin commented 1 month ago

@JokerBoom could you please describe me how to get this to work in cursor? Here are the steps I followd.

I tried different combinations with the pipe transport but the result is the same, debugger opens and closes and nothing happens in between. Note that the same config with the commented out pipe transports work on vscode.

2024-05-27 11 49 58

JokerBoom commented 1 month ago

i do not use cursor anymore。:)

deniz gökçin @.***>于2024年5月27日 周一18:00写道:

@JokerBoom https://github.com/JokerBoom could you please describe me how to get this to work in cursor? Here are the steps I followd.

-

On a clean IDE with no c# related extensions installed. I downloaded the latest version of this extension, extracted it and placed it under /usr/local/bin/netcoredbg.

Created a new project with dotnet new console. Added the following launch.json and tasks.json. .vscode/tasks.json

{ "version": "3.0.0", "tasks": [ { "label": "build", "command": "dotnet", "type": "process", "args": [ "build", "${workspaceFolder}/test-1.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" }, { "label": "publish", "command": "dotnet", "type": "process", "args": [ "publish", "${workspaceFolder}/test-1.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" }, { "label": "watch", "command": "dotnet", "type": "process", "args": [ "watch", "run", "${workspaceFolder}/test-1.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" } ] }

.vscode/launch.json

 {
 "version": "0.2.0",
 "configurations": [
   {
     "name": ".NET Core Launch (console)",
     "type": "coreclr",
     "request": "launch",
     "preLaunchTask": "build",
     "program": "${workspaceFolder}/bin/Debug/net7.0/test-2.dll",
     "args": [],
     "cwd": "${workspaceFolder}",
     "stopAtEntry": false,
     // "pipeTransport": {
     //   "pipeCwd": "${workspaceFolder}",
     //   "pipeProgram": "bash",
     //   "pipeArgs": ["-c"],
     //   "debuggerPath": "/usr/local/bin/netcoredbg/netcoredbg",
     //   "quoteArgs": true
     // },
     "console": "internalConsole"
   },
   {
     // Use IntelliSense to find out which attributes exist for C# debugging
     // Use hover for the description of the existing attributes
     // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
     "name": ".NET Core Launch (web)",
     "type": "coreclr",
     "request": "launch",
     "preLaunchTask": "build",
     // If you have changed target frameworks, make sure to update the program path.
     "program": "${workspaceFolder}/bin/Debug/net7.0/test-2.dll",
     "args": [],
     "cwd": "${workspaceFolder}",
     "stopAtEntry": false,
     // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
     "serverReadyAction": {
       "action": "openExternally",
       "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
     },
     "env": {
       "ASPNETCORE_ENVIRONMENT": "Development"
     },
     "sourceFileMap": {
       "/Views": "${workspaceFolder}/Views"
     },
     // "pipeTransport": {
     //   "pipeCwd": "${workspaceFolder}",
     //   "pipeProgram": "bash",
     //   "pipeArgs": ["-c"],
     //   "debuggerPath": "/usr/local/bin/netcoredbg/netcoredbg",
     //   "quoteArgs": true
     // }
   },
   {
     "name": ".NET Core Attach",
     "type": "coreclr",
     "request": "attach"
   }
 ]}

-

Hit Debug(console)

I tried different combinations with the pipe transport but the result is the same, debugger opens and closes and nothing happens in between. Note that the same config with the commented out pipe transports work on vscode.

2024-05-27.11.49.58.gif (view on web) https://github.com/muhammadsammy/free-vscode-csharp/assets/33603535/dbe935dc-6473-4af6-9629-e86c8711320a

— Reply to this email directly, view it on GitHub https://github.com/muhammadsammy/free-vscode-csharp/issues/65#issuecomment-2133122549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA76JJNCK4SN7XBNP26G6QDZEL733AVCNFSM6AAAAABBFEL6Z6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGEZDENJUHE . You are receiving this because you were mentioned.Message ID: @.***>

dgokcin commented 1 month ago

in this case @muhammadsammy should I create a new issue for this?

muhammadsammy commented 1 month ago

in this case @muhammadsammy should I create a new issue for this?

Of course, please do