📢
4
c/coding-for-beginners•the_juliathe_julia•21d ago

Remember debugging with print statements?

I started coding back in 2018 and I swear I spent half my time just tossing print() calls everywhere to figure out what was happening. Took me like 3 years to finally learn how to use a proper debugger like the one in VS Code. Now I just set a breakpoint and step through the code in 10 minutes. Does anyone else hold onto old habits way longer than they should?
2 comments

Log in to join the discussion

Log In
2 Comments
sarahhart
sarahhart21d agoMost Upvoted
Hang on, you didn't start coding until 2018 and it took you three years to learn breakpoints? That's actually wild to me. I started coding in the early 2000s with like, Perl and PHP, and nobody even told me about debuggers until like 2015. We just had print statements and sheer desperation. So hearing you had access to VS Code's debugger from the jump and still chose print statements for three years is something else. The terminal being comforting is real though, I get it. There's a weird peace in seeing "Variable = None" splashed across 40 lines knowing you're about to fix it. But still, three years. That's a lot of print calls.
8
xena_miller31
Wait, is it bad that I still use print statements sometimes even though I know how to use breakpoints? There's something comforting about watching text scroll by in the terminal, like my code is talking to me.
5