from Hacker News

Show HN: Python decorator to log local variables with each line of code run

by xLaszlo on 12/2/23, 1:43 AM with 13 comments

  • by cozzyd on 12/2/23, 10:44 PM

    What advantage does this have over a debugger?

    (To be fair, in my experience, lots of python users have no idea what a debugger is...)

  • by JCharante on 12/3/23, 9:49 AM

    This looks pretty cool. I think this would be faster than using a debugger when doing leetcode / timed puzzles
  • by awithrow on 12/2/23, 3:34 PM

    nice, I do something similar with my tests to print out certain vars only when a test fails in order to get more context.
  • by xLaszlo on 12/2/23, 1:44 AM

    WIP: suggestions most welcome.