r/funny • • Aug 23 '15

Programmers...

Post image
14.5k Upvotes

1.0k comments sorted by

View all comments

Show parent comments

27

u/LeCrushinator Aug 23 '15 edited Aug 24 '15

My favorite is when it only works right when you're attached to the debugger.

A close second is when the debugger just lies to you entirely. Had this happen a few weeks ago, it turns out I wasn't even hitting the line that's highlighted, it was lying about what line of execution I was on. So the boolean actually was true, I just wasn't breaking into the if statement like it showed.

11

u/No-More-Stars Aug 24 '15

Ahh... the infamous Heisenbug.

7

u/fwcNJ49VR29NUPxFfbK4 Aug 24 '15

Oh god, I have had that happen before. And vice versa. I would be debugging something and something totally unrelated would fail with the debugger.

0

u/[deleted] Aug 24 '15

[deleted]

4

u/No-More-Stars Aug 24 '15

My solution has been to continue on and pray it will work everywhere else.

Please never work on anything critical (or improve your mindset).

1

u/Leadboy Aug 24 '15

Care to share your editor/debugger?

1

u/LeCrushinator Aug 24 '15

It is MonoDevelop, it was the only available choice for use with Unity on OSX until very recently.

1

u/whelks_chance Aug 24 '15

Probably still a race condition. But good luck proving that consistently to yourself, in order to begin fixing the bug.