Hello, excuse me sir! I think that you might have forgotten to put some lines in the description which you said that you will put but that's OK! Really, don't worry! I will put them in this comment. The required lines for luanch.json file in Visual Studio Code to set up debugging in VS Code (10:22): { "name": "Launch", "type": "coreclr", "request": "launch", "preLaunchTask": "build", "program": "Your Godot.exe (Or console window version of it) file path", "console": "internalConsole","stopAtEntry": false } (Add a coma "," before the first brace if you have any other configurations before this one.) The required lines for command line arguments for integrating Visual Studio ( 20:34 ): --path.--verbose And hey! I liked the video so much, the way you speak, the detailed information and the length of the video which fits the other specialties of the video, thank you noble man!
This is a textbook example of a guide to setting up development tools. It's a surprisingly rare skill and you make it look easy. Keep up the good work!
Great demonstration! Thanks! Quick reference for experience developers: 15:22 Section on VS 19:00 Editor setting 19:40 VS Building class library 20:20 New launch profile In short, set text editor to VS, create launch profile to mono build with `--path . --verbose`, working dir as `.`, and check Enable Native Debugging. This works by directly launch godot into game mode (same as "run" button in the editor) without starting editor. In Godot 4.3, Mono > Editor is Dotnet > Editor. A potential drawback of this method is we may not be able to debug C# and GDscript at the same time.
I just came here to say,. thanks a lot for this guide. I'm one of those developers who switched to Godot from Unity after the aftermath, and thanks to this video I managed to integrate Godot in both Visual Studio Code and Visual Studio 22 in 2 different computers, flawlessly.
So i tried getting it to work in Visual Studio. The way described in this video did not work. Then i installed the official godot visual studio extension, which then itself installed lots of xamarin/monodebugger stuff and it should also allow debugging but it did not. Then i followed another links that describes a known issue with VS2022 which according to the post requires an absolute path for the working directory instead of the single dot like in this video. That worked. Now since that looks almost like what is shown in this video, i tried this videos solution again and it now also works. I now got a working solution and i have no idea which of the many seemingly useless steps made the difference. That was an adventure. And your avatar looks like me. I think i like you. Not because of that, the video is nice as well.
Absolutely awesome! As a newcomer, this just saved me hours if not even days of struggle. Thanks to you I am now able to use sophisticated C# libraries in my Godot projects.
Oh a Godot 4 C# tutorial that is easy to follow and very well explained and leads to something that works!? This is so weird! You're the man dude, thank you very much!
This is Priceless. As a very novice VisualStudio coder I was really struggling to get the debugging to work using the GoDot Online Documentation. Just could not figure out the new profile part. This made it crystal clear. Saving this video for future reference. I'm sure I'll be returning to this next time I setup VS for Godot...
Coming from the "Damned" Unity, this tutorial is the starting point for me to transfer all my C# development skills to Godot. I really appreciate your helpful tutorial. Thank you.
Thank you! I have literally spent the last 3 days trying to figure out how to get debugging working in 4.0. Thought I was going to have to wait for the Godot C# plugin to be updated 😛. Will definitely be crediting this video as a setup step for some stuff I'm planning to upload =D.
Fantastic guide for VSCode, thanks! As a professional C# dev I'm so excited for the .NET 6 support in Godot. Bit of feedback: Can you add a 00:00 starting timestamp in your timestamps list so it parses into video chapters? It would be nice to have them to refer back to. Thanks again!
this is surprising. I remember that i cried at godot 3 c# because of visual studio and vsc was hard to get and i got a lot of errors. Now i am laughing because i forgot to add the a dot and for not adding it, it launched the project manager instead 😂😂. Thank you for the help.
Aaaaaand another project I start aaaaand another project I need to come to this video to remember the debug properties stuff to run debug from Visual Studio. This video should be pinged in the Godot documentation
Great video, managed to get this working in VS and VS Code very quickly. Being able to debug in an external IDE and IntelliSense is great but the dev flow is still pretty clunky. There's no hot reload on save like you have with GDScript in the Godot IDE, so every time you need to test code changes you have to rebuild the project by manually restarting the debugger. It only takes a few seconds but does add up over the course of a day.
A what a live saver. Just updated my new project to Godot 4 and the Debugger stopped working and the Documentation is not yet updated. By the way, when attaching to a running process, you can hover over it to reveal the arguments the process was started with. The right process, will have the startup scene as its last argument.
The Visual Studio Code part does not do autocomplete, because MSBuild is missing. I'm guessing you had it from elsewhere installed already, so skipped this step. Survivorship bias ;)
EDIT: Figured it out, I had to use the exec and not the .app file. So /Applications/Godot_mono_4.2.1 {dot} app/Contents/MacOS/Godot for Mac users. How would I setup up the filepath in macos for the "program": part? Keep getting "launch: program '/Applications/Godot_mono_4.2.1.app' does not exist."
@@FinePointCGI actually I believe they are really good for someone who wants to code with Godot and this helps in choosing for c# or gdscript. If someone asks me, this is what I will refer to.
This almost works, Console.WriteLine("test") or Debug.WriteLine("test") or GD.Print("test") all do not output to the output tab in visual studio. when I click the button in Godot, it works in Godot. but in Visual studio I get zero output.
Thanks for this very helpful video. I have a question. If you move the c# .csproj into a new directory in your filesystem, resolve the reference in the .sln file so it is loaded and building properly, and then follow these exact Visual studio steps in this video, the debug profile launches the project manager instead of the project itself. Do you know why this is? I am trying to manage the organization of my project root directory files and I want the c# project one folder deeper.
Do you know how to make the debug window launch on the same monitor as the godot engine? If I launch the scene from Godot itself, it launches on the same window, but if I launch it with vscode, it launches on my primary monitor.
13:17 for some reason at this point all of my breakpoints are disabled, mouseover they say "no symbols have been loaded for this document". did I miss something?
Alot of times this happens if the debugging assemblies are not loaded you can check this at debug > windows > modules to see if its loaded. If its not loaded you can try rebuilding the project under the build > rebuild menu. if that doesnt work you can try Right mouse click your project Select [Properties] Select the [Build] tab Make sure [Define DEBUG constant] and [Define TRACE constant] are checked Make sure [Optimize Code] is unchecked Click the [Advanced] button at the bottom of the Build tabpage Make sure that [Debug Info:] is set to [full] Click [OK] and rebuild the project and see if that works.
@@FinePointCGI Thanks for the quick reply! I forgot to mention I'm using VSCode so all of my troubleshooting had to be done within launch.json. Someone in the Godot Discord pointed out that since I was using Godot 3.5.1, the launch profile "type" had to be "godot-mono" instead of "coreclr" (which would have been correct for Godot 4.x+)
Hey! Thank you for the tutorial, it helped a lot :) I have a question though -- is there any way how to display the Godot's console (e.g. the stuff printed by GD.Print method) in the Visual Studio please? I tried swapping the executable with the Godot_v-stable_mono_win64_console console version, then I'm able to see the print output in the console, however in that case I'm not able to hit any breakpoints. Thanks to anyone for advice and I'm sorry if this question has been asked before :)
Thanks for this guide, I have one problem after hooking up VS 2022 to Godot, everything works perfectly except I no longer see the output from Godot, not in the VS or Godot output windows, so GD.Print is essentially lost in the void.
I've also ran into this you could use console.write line instead which would give you the same result but it will work for visual studio and not in Godots output
Is there a reason onsole.write line would not be showing in the output window of visual studio? Am I looking in the wrong spot? I have also tried: System.Diagnostics.Debug.WriteLine("test"); @@FinePointCGI
Im writing all of the following and still no output when running from Visual Studio, (i do get output when i run from godot, just can;t debug breakpoints in VS) GD.Print("Hello world"); Console.WriteLine("Hello world"); Debug.Write("Hello world");
This is a known issue currently with Godot. I am having similar issues it seems gd print works only when running in Godot and console.writeline only works when running Godot in console mode however this breaks vs integration.
I have the same problem. I don't know if has a workaround, but I noticed that GD.PushWarning or GD.PushError shows in the console inside Visual Studio.
@@FinePointCGI me neither! I started messing with Godot today, and the 'Enable native code debugging' needs to be activated work, maybe there is some unknown configuration to make the GD.Print or Console.WriteLine to work inside the Visual Studio 2022.
@luizcassettari That's really interesting! Does your debugging/breakpoints work because on my end it does but I've had a few reports of people saying it doesn't
Is there a Way to Make the Button "Profile 1" in Visual Studio 22 save the whole Project before executing the Project? For me it doesnt take changes into account i did in the Godot Editor unless i manually save beforehand in the Godot editor....
autocompletion doesn't work and on 9:47 I got an error stating: "Cannot create .NET debug configurations. The OmniSharp server is still initializing or has exited unexpectedly. Source: C# (extension)" Help would be appreciated!
I would reinstall my C sharp add-on for visual studio code. Usually this error occurs if omni sharp server somehow decided not to initialize properly. Omni Sharp does all of your autocompletion and all of your building and debugging so if it doesn't initialize properly it'll break.
@@FinePointCGI Thank you so much for such a quick answer! Unfortunately I tried reinstalling the C# add-on and deleting the launch.json file to restart the whole process at least 2 times and it still seems to not work:/
Would this have to be done everytime I'm starting a new Godot project? Not that there's any problem with doing that but I just wanted to know in case I have to memorize these steps
hi How can I setup fps in viewport in godot 4. I have 135 fps and I don't need all these fps in the viewport but I need only 30 fps . In unreal engine 5 I can control fps . But in godot I don't nom how to do it
Under project > project settings on the right hit advanced settings the go to run max fps. You also can go to display > window and adjust your vsync if you want to go above 135
Hi, thanks for the great guide. But I have a problem that when I run the game via VS, I do not load the pdb files for my dll. Don't know how to solve this? Configuration: MS Visual Studio 2022 17.4.1 Godot 3.5.1 stable mono x64
The GD.Print function does not show up in both the Godot Editor and VS output console (only when launch via Debug profile), run directly via Godot Editor still working fine. How do I fix this?
Debugging in Visual Studio 2022 isn't working for me. Followed everything in the video, and when I hit run, whether I have a breakpoint in _Ready or in _Process, neither get tripped, and the code is running because I'm printing error messages in those methods, and seeing the messages. Just no breakpoints.
@@FinePointCGI Hey! Thanks for the reply! I meant to say printing to the output area in Godot. I found the answer to my problem though. (Please don't laugh at the solution). I hadn't saved the file in VS, so Godot had no way of reading the updated script. Too much shame for me for one day. Thank you for the video though :)
Works well but in my Case Visual Studio wants to install .net 6 i installed 8 and i want to use the 8 framework how can i fix that? I mean it works but you know a Warning is a Warning :D
hmmm...I neither have the "mono" option in editor settings nor do I have the "c#" option in project tools (which i found smth pointing to it in the godot docs)
Are you running the mono version of godot? They have two clients one for mono and GD and one for just GD you can tell by looking at the bottom right of your editor it should say version 4.x-mono or something to that effect.
@@FinePointCGI yea. I did find that out after the fact. was running the editor you can get off of steam. thought they may have given people the option to switch to mono using a beta branch or smth. but guess the mono versions are only available through the website
@InfVR yeah That's something that is a conversation within the community of whether or not they should combine and just have one version of Godot that has both. Or have the ability to download it at least from steam..
@@FinePointCGI yea.. also quick question (if you are familiar with godot's VR support and how to set it up) if not it is fine too. I am currently trying to figure out how to get an output to my HMD (valve index) the tracking seems to work fine I just can't get an image to appear inside the hmd. if you could help me with that I would be very thankful. (switched over from Unity btw. having a bit of a hard time)
@InfVR it's on my list to look at but they do have some basic projects located github.com/GodotVR/godot-xr-tools It's in GD script so some translation will be needed. I plan to do vr and at but it's like iOS in godot it's kind of painful.
Hi, vim user here 👋 Does Godot 4 now has proper LSP server? (can be started from CLI) I remember in the past that I need to run the editor to activate the GDscript auto-completion in VSCode
When I'm trying to debug VS gives me the following error: The project doesn't know how to run the profile 'ProfileName' and command 'Executable' Anyone else?
Don't know exactly why, but... When I updated my VS Extensions (things that I use for work like EF Power tools) the error gone. ¯\_(ツ)_/¯ Just leaving this comment to help others :)
Hey man! Very helpful and good tutorial. Quick question though. I went with the setup for Visual Studio and everything seems to be working. My only problem is that when I debug from within VS I can set breakpoints however I cannot see the output from the GD.Print() lines. They are neither shown in the VS Output nor in Godot. Do you know any way to fix this?
I forget Linux syntax but When you run it from the terminal I wonder if you need to put a . Beforehand perhaps it's not trying to execute it correctly or something or add it to your path and just input that var? I'll download Linux and install it I've been meaning to do tutorials on Linux.
Do you have .net 6 installed? Some other things to check You can't have other versions of .net You may need to generate a new sln file You should check the version of your vs code c# plugin
Hi, please don't put a special character like "#" in your project's name, you're gonna be blocked trust me. I did this because this was my first c# project in godot and this blocked me for so long lmfao
@@FinePointCGI 4.0 stable, no errors. I even used the new godot templates for the jsons but it just doesnt start the program, at most it's launching godot itself. I have given up and am using GDScript now
Yeah, this tutorial is very out-of-date, the intellisense does not pick up Godot at all when you set it up like this. Please do not refer to this tutorial anymore!
Here's the fix. You only need the "C#" extension installed. You DO NOT need the "C# Dev Kit" extension installed. After installing the C# extension, click the little cog icon next to it and choose "Extension Settings". Find the setting called "Use Omnisharp" and check it. Restart VSCode. That said, the debugging portion of this does not work at all for VSCode. Trying to figure that out, now.
Hello, excuse me sir! I think that you might have forgotten to put some lines in the description which you said that you will put but that's OK! Really, don't worry! I will put them in this comment.
The required lines for luanch.json file in Visual Studio Code to set up debugging in VS Code (10:22):
{
"name": "Launch", "type": "coreclr",
"request": "launch", "preLaunchTask": "build",
"program": "Your Godot.exe (Or console window version of it) file path",
"console": "internalConsole","stopAtEntry": false
}
(Add a coma "," before the first brace if you have any other configurations before this one.)
The required lines for command line arguments for integrating Visual Studio ( 20:34 ):
--path.--verbose
And hey! I liked the video so much, the way you speak, the detailed information and the length of the video which fits the other specialties of the video, thank you noble man!
Who else only needed the 19:44 part of getting your Godot app to run in Visual Studio? Useful video! Thanks!
I'm glad it worked for you! Im still trying to figure out how to reduce these videos down in length but I just make them longer instead!
@@FinePointCGI I'm having problems getting it to Print. Like I do GD.Print("blah"); but nothing comes through any of the consoles.
This is a textbook example of a guide to setting up development tools. It's a surprisingly rare skill and you make it look easy. Keep up the good work!
Hey thank you very much! I'm glad it was useful!
Great demonstration! Thanks!
Quick reference for experience developers:
15:22 Section on VS
19:00 Editor setting
19:40 VS Building class library
20:20 New launch profile
In short, set text editor to VS, create launch profile to mono build with `--path . --verbose`, working dir as `.`, and check Enable Native Debugging.
This works by directly launch godot into game mode (same as "run" button in the editor) without starting editor.
In Godot 4.3, Mono > Editor is Dotnet > Editor.
A potential drawback of this method is we may not be able to debug C# and GDscript at the same time.
A year later and this is still a life saver. I wouldn't have figured it out, thank you so much!!
Hey I'm glad it worked!
I just came here to say,. thanks a lot for this guide. I'm one of those developers who switched to Godot from Unity after the aftermath, and thanks to this video I managed to integrate Godot in both Visual Studio Code and Visual Studio 22 in 2 different computers, flawlessly.
Thank you. I set it up now with Visual Studio 2022 and had no problems at all. Working perfectly.
And I subscribed too. Thanks for the tutorials.
Hey im glad! Ive had some mixed messages for vs 2022 so im glad it worked!
So i tried getting it to work in Visual Studio. The way described in this video did not work.
Then i installed the official godot visual studio extension, which then itself installed lots of xamarin/monodebugger stuff and it should also allow debugging but it did not.
Then i followed another links that describes a known issue with VS2022 which according to the post requires an absolute path for the working directory instead of the single dot like in this video. That worked. Now since that looks almost like what is shown in this video, i tried this videos solution again and it now also works.
I now got a working solution and i have no idea which of the many seemingly useless steps made the difference.
That was an adventure. And your avatar looks like me. I think i like you. Not because of that, the video is nice as well.
That's interesting I wonder what made it work... I have set this up a few times but I will need to test this and verify this method still works.
Absolutely awesome! As a newcomer, this just saved me hours if not even days of struggle. Thanks to you I am now able to use sophisticated C# libraries in my Godot projects.
Thank you for helping out! It works for me.
Hope Godot C# Team will optimise all the unnecessary setup steps to actually work in a project.
Oh a Godot 4 C# tutorial that is easy to follow and very well explained and leads to something that works!? This is so weird! You're the man dude, thank you very much!
This is Priceless. As a very novice VisualStudio coder I was really struggling to get the debugging to work using the GoDot Online Documentation. Just could not figure out the new profile part. This made it crystal clear. Saving this video for future reference. I'm sure I'll be returning to this next time I setup VS for Godot...
Coming from the "Damned" Unity, this tutorial is the starting point for me to transfer all my C# development skills to Godot. I really appreciate your helpful tutorial. Thank you.
Thanks a ton for this. I was tired of using GD.Print statements everywhere in the Visual Studio code. Much appreciated! Subscribed!
Thank you! I have literally spent the last 3 days trying to figure out how to get debugging working in 4.0. Thought I was going to have to wait for the Godot C# plugin to be updated 😛. Will definitely be crediting this video as a setup step for some stuff I'm planning to upload =D.
Hey thanks! I'm glad it's helpful!
Excellent video. I'd been confused by the old Godot 3.x C# guides, but it looks like Godot 4 is much easier to setup.
Fantastic guide for VSCode, thanks! As a professional C# dev I'm so excited for the .NET 6 support in Godot.
Bit of feedback: Can you add a 00:00 starting timestamp in your timestamps list so it parses into video chapters? It would be nice to have them to refer back to. Thanks again!
I thought it did I'm sorry let me add it!
Thank you for showing me how to go around that library whatever error in Visual Studio when you want to debug the project omg.
this is surprising. I remember that i cried at godot 3 c# because of visual studio and vsc was hard to get and i got a lot of errors. Now i am laughing because i forgot to add the a dot and for not adding it, it launched the project manager instead 😂😂. Thank you for the help.
Aaaaaand another project I start aaaaand another project I need to come to this video to remember the debug properties stuff to run debug from Visual Studio. This video should be pinged in the Godot documentation
Great video, managed to get this working in VS and VS Code very quickly.
Being able to debug in an external IDE and IntelliSense is great but the dev flow is still pretty clunky. There's no hot reload on save like you have with GDScript in the Godot IDE, so every time you need to test code changes you have to rebuild the project by manually restarting the debugger. It only takes a few seconds but does add up over the course of a day.
On the other hand, though, you don't need to bother with GDScript. Which is a huge bonus.
im pretty sure your viewcount reflects the amount of Godot C# projects :D . Ty for the vid!
YUGE!!! Thanks for showing me how to debug in Visual Studio!
A what a live saver. Just updated my new project to Godot 4 and the Debugger stopped working and the Documentation is not yet updated.
By the way, when attaching to a running process, you can hover over it to reveal the arguments the process was started with. The right process, will have the startup scene as its last argument.
Thanks for this, been tearing my hair out trying to get this to work. Liked and Subscribed!
gooood!!! currently vscode c# addon is not working correctly😢 but vstudio works fine. thanks for this.
Just what I was looking for. Thank you very much!
thank you so much, got this working on visual studio
I thought I'd get this video together before we start our c# horror game adventure!
@@FinePointCGI Sounds exciting! Love to see more c# godot tutorials
great job, visual studio working perfect thanks to you
The Visual Studio Code part does not do autocomplete, because MSBuild is missing. I'm guessing you had it from elsewhere installed already, so skipped this step. Survivorship bias ;)
You've saved me a lot of time. Thanks!
I'm glad it worked for you!
very informative video as always!
Aca en Argentina estoy usando GODOT 4 beta 3 esta genial!
Amazing, thank you so much !
You are a lifesaver man!
5:00 Can I use a higher DotNet version? I installed it via Visual Studio, and it says that the version is 7.0.401 on my computer.
You should be able to if you're using godot 4.1 according to the devs it supports up to 7
EDIT: Figured it out, I had to use the exec and not the .app file. So /Applications/Godot_mono_4.2.1 {dot} app/Contents/MacOS/Godot for Mac users.
How would I setup up the filepath in macos for the "program": part? Keep getting "launch: program '/Applications/Godot_mono_4.2.1.app' does not exist."
Thanks a lot, very useful video.
Thx Mitch, you are the best!
Hey thanks! I always struggle with thinking my videos are bad so it means a lot!
@@FinePointCGI actually I believe they are really good for someone who wants to code with Godot and this helps in choosing for c# or gdscript. If someone asks me, this is what I will refer to.
Very helpful. Thank you
Great one! I haven't added my main scene yet but I'm sure it will work probably maybe. Is there any configuration to make it run the opening scene?
Nice many thanks!
Thank you so much man
Thank you!
Attach Debugging, It can only be used during realtime. process or update.
Unfortunately this doesn't generate a solution file for me and Visual Studio doesn't properly attach to Godot 4.3 😔
This almost works, Console.WriteLine("test") or Debug.WriteLine("test") or GD.Print("test") all do not output to the output tab in visual studio. when I click the button in Godot, it works in Godot. but in Visual studio I get zero output.
Thanks for this very helpful video.
I have a question. If you move the c# .csproj into a new directory in your filesystem, resolve the reference in the .sln file so it is loaded and building properly, and then follow these exact Visual studio steps in this video, the debug profile launches the project manager instead of the project itself. Do you know why this is? I am trying to manage the organization of my project root directory files and I want the c# project one folder deeper.
How do i run the project in VS code using ADB? Windows
That did it!
Do you know how to make the debug window launch on the same monitor as the godot engine? If I launch the scene from Godot itself, it launches on the same window, but if I launch it with vscode, it launches on my primary monitor.
13:17 for some reason at this point all of my breakpoints are disabled, mouseover they say "no symbols have been loaded for this document". did I miss something?
Alot of times this happens if the debugging assemblies are not loaded you can check this at debug > windows > modules to see if its loaded. If its not loaded you can try rebuilding the project under the build > rebuild menu. if that doesnt work you can try
Right mouse click your project
Select [Properties]
Select the [Build] tab
Make sure [Define DEBUG constant] and [Define TRACE constant] are checked
Make sure [Optimize Code] is unchecked
Click the [Advanced] button at the bottom of the Build tabpage
Make sure that [Debug Info:] is set to [full]
Click [OK] and rebuild the project
and see if that works.
@@FinePointCGI Thanks for the quick reply! I forgot to mention I'm using VSCode so all of my troubleshooting had to be done within launch.json. Someone in the Godot Discord pointed out that since I was using Godot 3.5.1, the launch profile "type" had to be "godot-mono" instead of "coreclr" (which would have been correct for Godot 4.x+)
Ah that makes sense!
Thank you
Hey! Thank you for the tutorial, it helped a lot :) I have a question though -- is there any way how to display the Godot's console (e.g. the stuff printed by GD.Print method) in the Visual Studio please?
I tried swapping the executable with the Godot_v-stable_mono_win64_console console version, then I'm able to see the print output in the console, however in that case I'm not able to hit any breakpoints.
Thanks to anyone for advice and I'm sorry if this question has been asked before :)
Thanks a lot
hey with vsstudio is it possible to debug from another scene ? or i will always have to change scene to go on my debug scene ?
Thanks for this guide, I have one problem after hooking up VS 2022 to Godot, everything works perfectly except I no longer see the output from Godot, not in the VS or Godot output windows, so GD.Print is essentially lost in the void.
I've also ran into this you could use console.write line instead which would give you the same result but it will work for visual studio and not in Godots output
Is there a reason onsole.write line would not be showing in the output window of visual studio? Am I looking in the wrong spot? I have also tried: System.Diagnostics.Debug.WriteLine("test"); @@FinePointCGI
It`s works, but not completely. When I exit the Ready function, the program says that I need to show the path to Node.cs. What does it mean?
Im writing all of the following and still no output when running from Visual Studio, (i do get output when i run from godot, just can;t debug breakpoints in VS)
GD.Print("Hello world");
Console.WriteLine("Hello world");
Debug.Write("Hello world");
This is a known issue currently with Godot. I am having similar issues it seems gd print works only when running in Godot and console.writeline only works when running Godot in console mode however this breaks vs integration.
I have the same problem. I don't know if has a workaround, but I noticed that GD.PushWarning or GD.PushError shows in the console inside Visual Studio.
Oo that's a good tip! I didn't know that was a thing!
@@FinePointCGI me neither! I started messing with Godot today, and the 'Enable native code debugging' needs to be activated work, maybe there is some unknown configuration to make the GD.Print or Console.WriteLine to work inside the Visual Studio 2022.
@luizcassettari That's really interesting! Does your debugging/breakpoints work because on my end it does but I've had a few reports of people saying it doesn't
I dont have any logs on VS2022 or on Godot When i lunch the Game from VS2022.. is that normal ?
Is there a Way to Make the Button "Profile 1" in Visual Studio 22 save the whole Project before executing the Project? For me it doesnt take changes into account i did in the Godot Editor unless i manually save beforehand in the Godot editor....
autocompletion doesn't work and on 9:47 I got an error stating:
"Cannot create .NET debug configurations. The OmniSharp server is still initializing or has exited unexpectedly.
Source: C# (extension)"
Help would be appreciated!
I would reinstall my C sharp add-on for visual studio code. Usually this error occurs if omni sharp server somehow decided not to initialize properly.
Omni Sharp does all of your autocompletion and all of your building and debugging so if it doesn't initialize properly it'll break.
@@FinePointCGI Thank you so much for such a quick answer!
Unfortunately I tried reinstalling the C# add-on and deleting the launch.json file to restart the whole process at least 2 times and it still seems to not work:/
Do you have any other versions of .net?
I now tried it with .NET 7 and it still doesn't seem to work. .NET 4 does the same thing but doesn't show an error.
You should not have any other version of.net installed other then 6 that can really mess with OmniSharp for some reason
Autocompletion is broken. Omnisharp won't start. Any idea how to fix this insanity?
is there any way to see the console output in visual studio 2022, either from GD.Print or Console.WriteLine?
Would this have to be done everytime I'm starting a new Godot project? Not that there's any problem with doing that but I just wanted to know in case I have to memorize these steps
Yes anytime you start a new project you want me to do this. However just the last few steps for debugging.
VS 2022 Normal error show but not GD.Print and GD.PrintErr. in your video isn't show is working or not
how edit gdscript in vs ?
hi
How can I setup fps in viewport in godot 4.
I have 135 fps and I don't need all these fps in the viewport but I need only 30 fps .
In unreal engine 5 I can control fps . But in godot I don't nom how to do it
Under project > project settings on the right hit advanced settings the go to run max fps. You also can go to display > window and adjust your vsync if you want to go above 135
@@FinePointCGI thank you
Hi, thanks for the great guide.
But I have a problem that when I run the game via VS, I do not load the pdb files for my dll. Don't know how to solve this?
Configuration:
MS Visual Studio 2022 17.4.1
Godot 3.5.1 stable mono x64
The GD.Print function does not show up in both the Godot Editor and VS output console (only when launch via Debug profile), run directly via Godot Editor still working fine. How do I fix this?
You cant. Thats a limitation we have for right now.
Do you have to do the launch profiles every time you create a project or only the first time you set VS or Vscode up?
Only the first time you set it up for that project.
@@FinePointCGI Why can't this process be automated or set up so it's done automatically for all C# projects you create?
It could but the Godot devs would need to update the integration to handle it
Debugging in Visual Studio 2022 isn't working for me. Followed everything in the video, and when I hit run, whether I have a breakpoint in _Ready or in _Process, neither get tripped, and the code is running because I'm printing error messages in those methods, and seeing the messages. Just no breakpoints.
I'll double check on visual studio 2022 to see what's going on it's possible something may have changed
@@FinePointCGI It took a few reboots, and the console version doesn't work, which sucks because you can read the GD.Print, but it works now.
How do u do the same with Linux ?
My editor doens't have the option of "mono", that can I do?
Just do c# or dotnet I believe with a new plug in it uses that instead
I don't have a Build button in the top right. Is is because there's no C# file at all in my game yet?
Yes if you don't have a solution or C's proj it will not have the build button
That means, I can now debug godot via visual studio like in unreal engine development?
Sort of yes. Your console.writelines wont work and printing wont work but you can step though your code in visual studio
What's the difference between this and the Godot C# plugin?
The c# plugin is used for godot 3.5 because it used the old mono system and the plugin does not work (unless they have updated it).
I'm just trying to print to the console with GD.Print() and it doesn't show in the console. I can't believe I'm stuck on this.
You can't sadly you need to do Console.WriteLine
@@FinePointCGI Hey! Thanks for the reply! I meant to say printing to the output area in Godot. I found the answer to my problem though. (Please don't laugh at the solution).
I hadn't saved the file in VS, so Godot had no way of reading the updated script.
Too much shame for me for one day.
Thank you for the video though :)
Works well but in my Case Visual Studio wants to install .net 6 i installed 8 and i want to use the 8 framework how can i fix that? I mean it works but you know a Warning is a Warning :D
How do I get access to what was written to console via GD.Print(...)?
You have to look at the godot editor to see the log messages
@@FinePointCGI okay, but that doesn't show if you start via VS.
this saved me, thanks a lot
hmmm...I neither have the "mono" option in editor settings nor do I have the "c#" option in project tools (which i found smth pointing to it in the godot docs)
Are you running the mono version of godot? They have two clients one for mono and GD and one for just GD you can tell by looking at the bottom right of your editor it should say version 4.x-mono or something to that effect.
@@FinePointCGI yea. I did find that out after the fact. was running the editor you can get off of steam. thought they may have given people the option to switch to mono using a beta branch or smth. but guess the mono versions are only available through the website
@InfVR yeah That's something that is a conversation within the community of whether or not they should combine and just have one version of Godot that has both. Or have the ability to download it at least from steam..
@@FinePointCGI yea.. also quick question (if you are familiar with godot's VR support and how to set it up) if not it is fine too. I am currently trying to figure out how to get an output to my HMD (valve index) the tracking seems to work fine I just can't get an image to appear inside the hmd. if you could help me with that I would be very thankful. (switched over from Unity btw. having a bit of a hard time)
@InfVR it's on my list to look at but they do have some basic projects located
github.com/GodotVR/godot-xr-tools
It's in GD script so some translation will be needed. I plan to do vr and at but it's like iOS in godot it's kind of painful.
autocomplete not working for me
Hi, vim user here 👋
Does Godot 4 now has proper LSP server? (can be started from CLI)
I remember in the past that I need to run the editor to activate the GDscript auto-completion in VSCode
For GDScript yes it's the same as 3.5 the language server starts with Godot for C# since it's Net 6 it should work without Godot.
When I'm trying to debug VS gives me the following error: The project doesn't know how to run the profile 'ProfileName' and command 'Executable'
Anyone else?
* Already installed "Development tools for .NET" on installer.
Don't know exactly why, but...
When I updated my VS Extensions (things that I use for work like EF Power tools) the error gone.
¯\_(ツ)_/¯
Just leaving this comment to help others :)
That's kind of odd! ill keep it in mind when I have to set up my machine again!
Hey man! Very helpful and good tutorial. Quick question though. I went with the setup for Visual Studio and everything seems to be working. My only problem is that when I debug from within VS I can set breakpoints however I cannot see the output from the GD.Print() lines. They are neither shown in the VS Output nor in Godot. Do you know any way to fix this?
You can't see the output so you would need to use console.writeline instead due to how logging is done in c#
@@FinePointCGI I see, that's what I figured. Thank you!
I tried to replicate the debugging setup on Linux and got stuck at the program path not being recognized. Anybody figured out how to solve it?
What's the path you're using?
@@FinePointCGI I tried many paths. For instance: "/run/media/novhack/Orange/Godot_v4.0-beta3_mono_linux_x86_64/Godot_v4.0-beta3_mono_linux.x86_64"
I forget Linux syntax but When you run it from the terminal I wonder if you need to put a . Beforehand perhaps it's not trying to execute it correctly or something or add it to your path and just input that var?
I'll download Linux and install it I've been meaning to do tutorials on Linux.
everything else works for me except for the auto completion :C
same
why is the intellisense for godot not working in vs code route
someone pls help me
What's it doing? What version of Godot?
no intellisense and it auto corrects to guid
4.0.2
Do you have .net 6 installed? Some other things to check
You can't have other versions of .net
You may need to generate a new sln file
You should check the version of your vs code c# plugin
add this vs code plugin
ruclips.net/video/7nExKQn1CAw/видео.html
Hi, please don't put a special character like "#" in your project's name, you're gonna be blocked trust me. I did this because this was my first c# project in godot and this blocked me for so long lmfao
Yup! I found that out the hard way!
Does not seem to work right anymore even with their templates, it does not start the editor or enable debugging. This is honestly tiresome.
What version of Godot are you using? I just tested this and it works for me. Are you getting any errors or anythin
@@FinePointCGI 4.0 stable, no errors. I even used the new godot templates for the jsons but it just doesnt start the program, at most it's launching godot itself. I have given up and am using GDScript now
Hot reload not work in c# ~~~~
if you disable the native code debugging it will work, somehow native debugging + hot reload = no bueno
Yeah, this tutorial is very out-of-date, the intellisense does not pick up Godot at all when you set it up like this. Please do not refer to this tutorial anymore!
It should still work I think Microsoft did an update to visual studio codes plugin so you might want to downgrade the plugin and that may help
Here's the fix. You only need the "C#" extension installed. You DO NOT need the "C# Dev Kit" extension installed. After installing the C# extension, click the little cog icon next to it and choose "Extension Settings". Find the setting called "Use Omnisharp" and check it. Restart VSCode. That said, the debugging portion of this does not work at all for VSCode. Trying to figure that out, now.
terrible, broke my vs code setup lol
install dir
--path. --verbose
.
enable native code debugging = true