TheDoctor [they/them]

  • 0 Posts
  • 11 Comments
Joined 8 months ago
cake
Cake day: March 25th, 2024

help-circle


  • TheDoctor [they/them]@hexbear.nettoProgrammer Humor@lemmy.mlDebugging
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    16 hours ago

    I did both of these at once last week.

    Added a breakpoint. Debugger didn’t break.

    Added an echo "here";. Debugger didn’t print.

    Added a throw new Exception('fuck');. Debugger didn’t throw.

    Stepped through. Debugger wouldn’t let me step in.

    It took me almost an hour to realize it wasn’t the debugger’s fault and that a variable I thought was guaranteed to be truthy at that point was actually falsey due to upstream changes in a spreadsheet parser. I felt kind of stupid for not trusting the debugger at that point.









  • I helped a friend debug a script last week that was working inconsistently in really weird ways. I looked at the script and it was all event hooks littered with sleep calls. I told him he was basically fuzz testing his own script and then getting surprised when he found race conditions. Shit was wild. Also, sometimes getters in Python are a mistake.