godot-csharp-visualstudio
godot-csharp-visualstudio copied to clipboard
Latest Update from the submitted PRs
There have been THREE PRs recently
- https://github.com/godotengine/godot-csharp-visualstudio/pull/31
- https://github.com/godotengine/godot-csharp-visualstudio/pull/32
- https://github.com/godotengine/godot-csharp-visualstudio/pull/35
Please provide the following information
- Are these PRs work for VS2022 or Just VS2019. Suggestion: please include VS2022
- What environment have people tested these PRs. Godot3 or Godot4 and what version. What is your experience?
I am interested to know if these PRs work with Godot4 with dotnet6 merged
It works bro it is locked to 2022....
I compiled the plugin xd
I saw under VS2019 menu extension. The submenu..GoDot and configure...but it crashes..
Share screenshots..please
i can send u the compiled plugin? and i fixed the GoDot bug replaced with Godot
Yes..please share ..do u use Google drive to share
The extension: https://www.mediafire.com/file/24ch2tz6u6embbq/GodotAddinVS.vsix/file
Btw u should help me by telling the owner of the PR to make some changes i mention in the PR of his/her
who are you
If this works, i will promote through godot discord
Dont promote me, promote the guy who make these changes
@GeorgeS2019 does it work?
@PandoCyclone
I installed the extension to VS2022. I see the Godot submenu under the Extension Top menu
I provide the Godot exe path to the the Godot Configure submenu
Then I launch Godot (Click)
The Godot exe specified during configure started and run the scene file (chosen)
====> However, the editor did not stop at the BREAKPOINT!!
My VS2022 17.4 preview
Not sure if this is related to this bug Extension stopped working on VisualStudio v17.3.0
So it worked or not xd? And i think the breakpoint part is a bug from the extension itself
btw check this out to be 100% sure https://github.com/jiiks/godot-csharp-visualstudio
Just so we are on the same page.
There is no more Play in Editor button There is no more extra steps we need to do a few months back
Now, we define the godot exe path and Luanch Godot.
Just so we are on the same page.
There is no more Play in Editor button There is no more extra steps we need to do a few months back
Now, we define the godot exe path and Luanch Godot.
Yes but there is some problem as i mentioned here https://github.com/godotengine/godot-csharp-visualstudio/pull/32#issuecomment-1232433130 which should make it even better
By making icon for the button and make the button replaced with the Debug one or at least in the tool bar
I suggest U do a gif animated showing that it debug and stop at BreakPoints
I suggest U do a gif animated showing that it debug and stop at BreakPoints
The breakpoints bug is from the plugin itself not because this PR
Is the breakpoints bug VS2022 version dependence?
If yes, showing that it works now with other version of VS2022 will also help a lot. We need the breakpoints <=== to work
I will be away. Thanks for the effort of sharing. I compile https://github.com/jiiks/godot-csharp-visualstudio
Godot run from VS2022 but NOT breakpoint This version is GoDot and not Godot
For me I don't even know what breakpoints are but you can ask everyone or just watch youtube videos they show that breakpoints bug not work and some workaround for that too. Here is a video for example: https://www.youtube.com/watch?v=lOjOb4Lv_ww&list=WL&index=2&t=992s&ab_channel=FinePointCGI
I will be away. Thanks for the effort of sharing. I compile https://github.com/jiiks/godot-csharp-visualstudio
Godot run from VS2022 but NOT breakpoint This version is GoDot and not Godot
Try my fix i sent upthere which fix the bug showing GoDot replaced with Godot and other enhance please check this https://github.com/godotengine/godot-csharp-visualstudio/pull/32#issuecomment-1232433130 comment and support for better PR
The old version, a few months back, the breakpoint WORKs BUT extra steps just to make it works
https://www.youtube.com/watch?v=lOjOb4Lv_ww&list=WL&index=2&t=992s&ab_channel=FinePointCGI
YES, this was the old way and I was able to make breakpoint work. ==> BUT it is NOT reliable.
I assume this is @Jiiks 's plan
-
Step2: Add a menu for launching GoDot from visual studio - to trigger the step1
-
Step5: implement thse debug targets or sub menu After Step1 supports reliable launching of Godot
From @neikeq: Better IDE support by default, less features need to be implemented in Godot IDE extensions. Projects would be runnable by default as they would be executable rather than library C# projects. A Godot extension would only need to add the more fancy features like
Play in Editor.
Summary
Debug targets
- Play in Editor
Launches the game in the Godot editor for debugging in Visual Studio.
For this option to work, a running Godot instance must be editing the project. - Launch
Launches the game with a Godot executable for debugging in Visual Studio.
Before using this option, the value of the "executable" property must be changed to a path that points to the Godot executable that will be launched. - Attach
Attaches to a running Godot instance that was configured to listen for a debugger connection.
Information provided by Neikeq how to get the extension to work with Godot4
Side note, think I've asked this before maybe, do you know of any way to attach a C# debugger to the C# module code in godot on Linux? To be able to set breakpoints in the
modules/mono .csfiles, run the editor and step through things? I feel like the answer is no, it seems to be possible on Windows with VS but no Linux tool I've tried is capable of the same "mixed mode" debugging magic that MS have.
I don't know about mixed mode, but for C# only I can do this in Rider:
- Add New Cofiguration: .NET Executable
- Exe path: Path to Godot executable
- Program arguments: --path /path/to/godot/project/
- Runtime: .NET / .NET Core
I tried this with VSCode, but I don't remember if it worked:
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"program": "Path to Godot executable",
"args": ["--path", "/path/to/godot/project/"],
"stopAtEntry": false,
"console": "internalConsole"
}
As for Windows and Visual Studio, you must add the following to your csproj (or a Directory.Build.props):
<PropertyGroup>
<StartAction>Program</StartAction>
<StartProgram>C:\Path\To\Godot.exe</StartProgram>
<StartArguments>--path C:\Path\To\Godot\Project\</StartArguments>
</PropertyGroup>
From neikeq: The root of the issue applies to Godot 4 as well. However, there are other challenges as well, like how to implement Play in Editor with the CoreCLR debugger.
Debugging CoreCLR
"To debug this project, configure it to use the 'Managed (CoreCLR)' debugger." when trying to debug multi target framework in .NET Core
Visual Studio managed debugger
How to: Specify Debugger Settings
case ExecutionType.Launch:
var processStartInfo = new ProcessStartInfo(GetGodotExecutablePath())
{
string workingDir = startInfo.WorkingDirectory;
Arguments = $"--path {workingDir} --remote-debug {host}:{remoteDebugPort} {godotStartInfo.StartArguments}", // TODO: Doesn't work with 4.0dev. Should be tcp://host:port which doesn't work in 3.2...
WorkingDirectory = workingDir,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
};
case ExecutionType.PlayInEditor:
var godotMessagingClient = GodotPackage.Instance.GodotSolutionEventsListener?.GodotMessagingClient;
// TODO: Read the editor player stdout and stderr somehow
case ExecutionType.Attach:
_attached = true;
StartConnecting(godotStartInfo);
Command line options
Command line options that can be included in godotStartInfo.StartArguments
Debug options
Standalone tools
Running a specific Scene :
Feature Request: 'Play Scene' from Visual Studio
Debugging a specific Scene
Running/Debugging a specific script
Umm, so there is a way to change GoDot to Godot But I need help with how to open a PR