Godot Version
4.2.1 windows
Question
Well i searched the web and there are many questions regarding to this . but none is worked for me
using c# with Godot_v4.2.1-stable_mono_win64.exe using visual studio 2022
when doing something like this in child node:
if(@event.IsPressed())
{
GD.Print("Test debug script");
}
i don’t see any thing in the godot output window , also i changed the port in the Editor settings ,
but the only way to see the print is when im using : Godot_v4.2.1-stable_mono_win64_console.exe
then i can see it in the console window . but visual studio can’t initiate debug only run .
UPDATE
I did simple project in mono version ,
When doing single node3d in project it is printing the log .
But when i add CharacterBody3D and attach script to it with simple
public override void _Ready()
{
GD.Print("Hello from CharacterBody3D");
}
It doesn’t print any thing
in short i need to be able to debug and see the prints .
Thanks
2 Likes
it can be either your godot is bugged or it’s just
whiletrue111:
if(@event.IsPressed())
never really true,
did you try GD.Print on ready?
1 Like
its true very true . i run it with debugger also and did simple GD.Print all over .
1 Like
Logan
December 26, 2023, 11:12am
4
Firstly, confirm that you have the Godot Tools extension installed in Visual Studio. This extension facilitates the debugging process.
Next, ensure that your project settings are configured for debugging. In Visual Studio, go to the “Debug” menu, select “Options,” and navigate to “Debugging” → “General.” Make sure that “Redirect all Output Window text to the Immediate Window” is checked.
Moreus
December 27, 2023, 10:56am
6
your topic should have information your problem is with “Visual Studio 2022”.
how you configured debuger? did you?
yes you right , using Visual Studio 2022
can’t edit the topic …
i dont want to hack my way to see simple logs …
So i guess its a bug ,
i already opened ticket with simple example
opened 10:34AM - 26 Dec 23 UTC
bug
needs testing
topic:dotnet
### Tested versions
Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Comp… atibility) - Intel(R) UHD Graphics 620 (Intel Corporation; 30.0.101.1338) - Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 Threads)
### System information
Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) UHD Graphics 620 (Intel Corporation; 30.0.101.1338) - Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 Threads)
### Issue description
Godot v4.2.1.stable.mono - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) UHD Graphics 620 (Intel Corporation; 30.0.101.1338) - Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 Threads)
No output from GD.Print in child node
Can see output from root node .
### Steps to reproduce
load the project in Godot_v4.2.1-stable_mono_win64.exe
Create profile in visual studio 2022 as in documentation ,
Run Debug
Only the root node GD.Print output is in the editor . the child node is not printing
### Minimal reproduction project (MRP)
[TestMe.zip](https://github.com/godotengine/godot/files/13770801/TestMe.zip)
1 Like
Moreus
December 27, 2023, 8:25pm
10
I think you duplicated topic
opened 03:52PM - 13 Dec 23 UTC
topic:dotnet
### Describe the project you are working on
Learning Godot under C#/Visual Stud… io.
### Describe the problem or limitation you are having in your project
Currently, if you debug under Visual Studio, you can add breakpoints and can have hotreload, but no GD.Print logs are displayed under the Output tab. To see them, you need to run the project in Godot editor, which adds to a constant and consuming task switching.
Please see this thread on reddit for more info:
https://www.reddit.com/r/godot/comments/16q9c4u/gdprint_in_visual_studio/
### Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be really helpful to see the GD.Print logs by default in the Output tab in Visual Studio, to help on a better proper debugging, and reducing the amount of back and forth between the IDE and Godot Editor.
### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I don't have the knowledge to do this. The feature should just display the logs in the Output tab windows in VS.
### If this enhancement will not be used often, can it be worked around with a few lines of script?
This enhancement would be used often by most beginner devs working under C#/Visual Studio. I don't have enough knowledge to tell if this could be solved easily with a few lines of code.
### Is there a reason why this should be core and not an add-on in the asset library?
This is basic debug info that would help beginners to track down their
code output without having to resort to creating their own log classes when they still probably don't have the knowledge for implementing them, difficulting their debug job and adding UX friction when working on other IDEs outside the Godot Editor.
Instead, I checked on VS Studio Code and this IDE shows GD.Print lines correctly. Please see image attached.
![GDPrint works well on VSCode not VisualStudio](https://github.com/godotengine/godot-proposals/assets/5320373/89d9c64b-db95-43d7-9743-3dabc6b5a1ad)