714
you are viewing a single comment's thread
view the rest of the comments
[-] atopi@piefed.blahaj.zone 16 points 1 day ago

a while ago, during a game jam, while i was making some of the worst gdscript i have ever seen, i have encountered a bug

after adding a print to see the value of a variable, the bug disappeared. Confused, i commented out the line i just added. The bug was still fixed

i removed the comment. The bug reappeared

[-] Willem@kutsuya.dev 2 points 1 day ago

printing to a console could enforce a flush, sync thread or other shenanigans.

usually setting a breakpoint would have the same effect and gives me the suggestion of a threading issue.

[-] atopi@piefed.blahaj.zone 3 points 1 day ago

the problem wasnt that the print statement fixed the bug

the problem was that even if i removed the print statement and added a comment on that line, the bug would also be fixed

this post was submitted on 25 May 2026
714 points (97.7% liked)

Programmer Humor

31576 readers
2146 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS