Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: vscodium+netcoredbg? #15

Closed
Novack opened this issue May 25, 2024 · 9 comments · Fixed by #65
Closed

Question: vscodium+netcoredbg? #15

Novack opened this issue May 25, 2024 · 9 comments · Fixed by #65

Comments

@Novack
Copy link

Novack commented May 25, 2024

Hello there Joanna, this repo looks so handy, I just grabed some vscode config files :) Thanks a ton!

Im wondering if you have tried a similar setup but using VSCodium? The debugger provided with Microsoft's C# extension is highly restrictive, licensed only to work with the official vscode build. A workaround for debugging C# projects in vscodium is to use Samsung's opensource netcoredbg package.

Do you, or anyone of your knowledge was able to make such setup work for Godot C# projects?

@jolexxa
Copy link
Member

jolexxa commented May 26, 2024

This was discussed in the Chickensoft discord. It seems possible in theory, but doesn't actually work yet afaik. See here and here

I have commented here trying to get more information, as well: godotengine/godot#87595

@Novack
Copy link
Author

Novack commented May 26, 2024

This is awesome, thanks a ton for the info. I've joined the discord, will close this issue now.

@Novack Novack closed this as completed May 26, 2024
@jolexxa
Copy link
Member

jolexxa commented May 26, 2024

We can actually keep this open — it would be nice to support it as soon as it's possible.

@jolexxa jolexxa reopened this May 26, 2024
@granitrocky
Copy link

Here's a PR on the VSCodium C# extension that would enable this:

muhammadsammy/free-vscode-csharp#68

@jolexxa
Copy link
Member

jolexxa commented May 29, 2024

Thank you! Once muhammadsammy/free-vscode-csharp#69 is merged in, we'll be able to proceed with creating launch.json options for this project and https://github.com/chickensoft-games/GodotGame

@jolexxa
Copy link
Member

jolexxa commented Jun 3, 2024

Update: now waiting on muhammadsammy/free-vscode-csharp#72

@GeneralProtectionFault
Copy link

GeneralProtectionFault commented Jun 21, 2024

Looks like that just got merged =D.
I tried grabbing & building the .vsix (following the process dgokcin used in that issue ^^^), installed it, and tried the launch.json examples graniterocky put in the same PR (in Godot).

It launched, which it wouldn't have done before the extension update, but it didn't hit a breakpoint. Also, the game itself didn't "really" launch. Very strange, it launches the editor--so I have 2 Godot editors open, but not the game. Not sure what's going on there.

I just used the vanilla C# tasks.json:

{
          "label": "build",
          "group": "build",
          "type": "shell",
          "command": "dotnet",
          "args": [
            "build",
            "/property:GenerateFullPaths=true",
            "/consoleloggerparameters:NoSummary"
          ],
          "problemMatcher": "$msCompile"
}

For clarity on on Linux (Garuda).

UPDATE
Nevermind, it works! The -e argument (I didn't realize) is for the editor instead of running the game.
I got rid of that and added -d (debug) and -b (breakpoints) to the pipe args and it hit a breakpoint & ran =D

UPDATE 2 - Don't actually need the arguments, which makes sense, those are Godot's, not .NET's.

@jolexxa
Copy link
Member

jolexxa commented Jun 21, 2024

@GeneralProtectionFault would you mind sharing the working launch.json? Feel free to sanitize any hardcoded paths. That will give me something to reference when updating launch configs and documentation.

@GeneralProtectionFault
Copy link

@definitelyokay Sure, like I said, I just used what graniterocky put in the PR you linked above (muhammadsammy/free-vscode-csharp#72) -- except remove "-e" from the pipe args, that opens the Godot editor instead of running the project. Also, the debug arguments I put in here are Godot's and are not necessary. I assume you'd just put any relevant arguments for running Godot there if there are any.

"configurations": [
        {
            "name": "🕹 Run/Debug Game",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "",
            "cwd": "${workspaceFolder}",
            "internalConsoleOptions": "openOnSessionStart",
            "pipeTransport": {
                "pipeCwd": "${workspaceFolder}",
                "pipeProgram": "/usr/bin/godot",
                "pipeArgs": [
                  "--debug",
                  "--breakpoints"
                ]
            }
        }
    ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants