Print doesnt work

func _ready() → void:
print(“x”)

is the script i use.

i g to the editor and press play and switch to the game tab and everything works but when i go back to the editor tab the output is empty. i tried making it run every frame and that doesnt work either.

the only message i get is the— Debugging process stopped — when i close the game tab

no output no errors and no warnings. is it just easier making a ui text for this?

The debug console gets cleared everytime you close the game and gives the message “Debugging process stopped”. Have you tried checking the console whilst the game is running?
If it’s still not working give print_debug(“x”) a try instead of print(“x”)

yes i do check the console while the game is running. i just meant i switched to the editor tab.

print_debug(“x”) also gives me nothing.

i also made a label and get_node("Node3D/debug ").text = str(“x”)
and that gives me zero errors but and the game runs i just cant use inputs

Are you sure the script is running at all?
Try checking if _ready() is actually working. Put some other code inside func _ready(): and see if that is working.

I had the same problem in one project and tried everything, it still won’t print but works in other projects. Now I have to use SLib.SaveLog() for that and open and print the log file in another project.

tried
func _ready() → void:
apply_torque_impulse(transform.basis.x * 300)
print_debug(“x”)
get_node("Node3D/debug ").text = str(“x”)
and nothing happens. might be it.

Is the script even attached to a node?

1 Like

yup the every frame part works fineyup the every frame part works fine

why do you use void ?

as i know void takes data from user but does not show any thing.
i think if you remove the void your problem will solve

theres no error but nothing is fixed

even is this enable?:

Screenshot_20240831_194511

2 Likes

You have a space after your get_node node name. "Node3D/debug "