• swordsmanluke@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Since adopting TDD, my debugger use has really dropped off. I think it’s partially due to TDD encouraging me to develop more pure functions and push side effects to injectable (and thus mockable) objects.

    But every so often I encounter a state that I can’t understand how the code gets into, and in those cases being able to step through everything that’s going on is incredibly helpful.

    I may not use my debugger every day, but when I want it, I’m sure glad it’s there.

    • Elise@beehaw.org
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      When I have a real head scratcher like that I use log with a b c d. It’s rare though and mostly due to me not paying attention or due to some convoluted calling graph.

      Ya I’ve also switched to functional wherever possible. I still use objects for di.

    • hascat@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Same here! Testing up front has made it extremely rare that I have to go back with a debugger later.