Godot: Suddenly no print() output in the console

Created on 21 Jan 2015  Â·  20Comments  Â·  Source: godotengine/godot

Happens when printing inside a loop. If it's an endless loop or just very many iterations, all the print() calls inside the loop will never show.
Every print() should be flushed to the output as soon as it is issued.

All you get is:

* Debug Process Started *
* Debug Process Stopped *

archived bug core

Most helpful comment

running 2.1.4

Try this:

func _fixed_process(delta):
    print("this wont print in godot's output debugger, but will print in cdm line--regression from 2.1.2 ")

It's broken in 2.1.4 - stable
It worked in 2.1.2 - stable

All 20 comments

yeah prints go via tcp connection and it most likely clogs and disconnects.
Maybe it should have a limit of characters/second and not send more than
that (add something like [too many chars])

On Wed, Jan 21, 2015 at 9:36 AM, ScyDev [email protected] wrote:

Happens when printing inside a loop. If it's an endless loop or just very
many iterations, all the print() calls inside the loop will never show.
Every print() should be flushed to the output as soon as it is issued.

All you get is:

* Debug Process Started *
* Debug Process Stopped *

—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/issues/1287.

if you run from commandline debugger (godot -d) you will be able to see the
whole output

On Wed, Jan 21, 2015 at 9:59 AM, Juan Linietsky [email protected] wrote:

yeah prints go via tcp connection and it most likely clogs and
disconnects. Maybe it should have a limit of characters/second and not send
more than that (add something like [too many chars])

On Wed, Jan 21, 2015 at 9:36 AM, ScyDev [email protected] wrote:

Happens when printing inside a loop. If it's an endless loop or just very
many iterations, all the print() calls inside the loop will never show.
Every print() should be flushed to the output as soon as it is issued.

All you get is:

* Debug Process Started *
* Debug Process Stopped *

—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/issues/1287.

Ok, starting from commandline with -d works.

But still, this is a bug that needs fixing, right?

yeah will keep this open until fixed

On Wed, Jan 21, 2015 at 2:29 PM, ScyDev [email protected] wrote:

Ok, starting from commandline with -d works.

But still, this is a bug that needs fixing, right?

—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/issues/1287#issuecomment-70881909.

Has this been fixed in the current master branch? I think I've already seen a "too many chars" output when printing a lot of stuff, but I'd have to check.

I think this is fixed, since I had the same problem once, but no more :smile: Still, better to wait for confirmation from @ScyDev or @reduz .

Closing as fixed, will reopen if it's not the case.

running 2.1.4rc - I have this bug

Ah, actually, rereading the OP's post:

If it's an endless loop or just very many iterations, all the print() calls inside the loop will never show.

I don't think that's fixed yet.

running 2.1.4

Try this:

func _fixed_process(delta):
    print("this wont print in godot's output debugger, but will print in cdm line--regression from 2.1.2 ")

It's broken in 2.1.4 - stable
It worked in 2.1.2 - stable

Changing "Editor Setting -> Network Host -> Debug Host" to localhost(127.0.0.1) solved the issue in 2.1.4 stable. (Windows 10 x64)

Changing "Editor Setting -> Network Host -> Debug Host" to localhost(127.0.0.1) solved the issue in 2.1.4 stable. (Windows 10 x64)

CC @Faless.

Yeah, I was suspecting this actually, apparently link-local ipv6 addresses (i.e. fe80::/64) does not work. Not sure why. I think we could just remove them as an option.
Also, the editor should pick 127.0.0.1 by default (assuming no one disables ipv4) and not the first one returned by the OS.
I'll work on a PR and we can discuss it further there

Is that one fixed then ?

Is that one fixed then ?

No. I had nothing in editor output console.
There were "Remote Debugger: Connection failed with status '1'" messages in Godot console window instead.

Changing "Editor Setting -> Network Host -> Debug Host" to localhost(127.0.0.1) solved the issue in 2.1.4 stable.

That worked for me.
Windows 10 x64, Godot 2.1.4 stable.

PROBLEM

Suddenly I can no longer print to the console in Godot 3.0.2 stable.

I can print in a new project, but not my old one.

Even when I delete all files and singletons in my project except for a simple Node2D with a script

extends Node2D

func _ready():
    print("test")

I get no output except the normal "Debugger Process Started" message. I don't even see the normal "OpenGL ES 3.0 Renderer..." message.

I have seen a few questions online about this problem for Godot 2.0, and the answers involve changing the debug_port from project settings to 127.0.0.1. My remote host is already set to 127.0.0.1, with remote port 6007.

OTHER INFO

I'm on MacOS Sierra 10.12.6.

I don't think this is an overflow issue since I am trying to print a single line.

When I start Godot, I click to allow Godot to accept incoming network connections. I also checked that Godot can accept connections from my Privacy Settings.

When I run -sudo lsof -i:6007 from Terminal to see what's using the port, I get a pattern like this

COMMAND PID           USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:6007->localhost:<port> (CLOSE_WAIT)
...
Godot   802 <user>   99u  IPv6 0x7fcb9f131f3b775f      0t0  TCP *:6007 (LISTEN)
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:6007->localhost:<port> (ESTABLISHED)
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:<port>->localhost:6007 (ESTABLISHED)
...
Godot   802 <user>   54u  IPv6 0x7fcb9f131c856...      0t0  TCP localhost:6007->localhost:<port> (CLOSE_WAIT)

Not sure what to make of this...

This may not be related, but when I run my code, I get the following warning:

Remote Debugger: Connection failed with status: '2', retrying in 1 msec.

The debugger seems to be working in that it still kills the run on errors.

I also asked about this on the Godot QA forum.

I solved the above problem I was having.

When I consulted the project.godot file in my project folder, I noticed there was a line

run/disable_stdout=true

This line was disabling the standard output, preventing printing to the console. I changed it to false and everything worked hunky-dory.

Not sure how this setting got changed.

image

@Noshyaar, how'd I miss that? Thanks!

Moved to #22184 for better visibility and clarity.

Was this page helpful?
0 / 5 - 0 ratings