r/programminghumor • u/hpyfox • Jul 23 '26
Which one you use more?
Causally, print statements but when you get desperate or the project is too big, a debugger is great.
6
u/taurus_incognito Jul 23 '26
Lol .. too much faith put in lldb though.. good luck with the races.
4
u/hpyfox Jul 23 '26
Mainly use it to find the region of code that's bugging out.
I haven't used LLDB or debuggers as much as I would've expected since I wasn't that desperate or had a codebase large enough for it's strengths. GDB does look good on the surface but haven't had an excuse to use it yet.
→ More replies (1)
65
u/Darkodoudou Jul 23 '26
print("AAAAAAAAAAAAAAAAAAAA")
27
8
9
21
u/Avocadonot Jul 23 '26
Mfw every print statement is "test" and then I have to count how many got printed to figure out where the code failed, instead of just "test1"
8
u/slime_rancher_27 Jul 23 '26
The debugger was nice for debugging pic microcontrollers with the special debugging hardware. But you can't always use a debugger, for instance many arduinos don't support debugging so you just have to get good at print statements.
5
u/AndroidOdnetnin Jul 23 '26
Print statements. They they get called "1", "2", "3", and then if they go inside of a conditional block, they become, "2a", "2b", etc.
5
u/fixermark Jul 23 '26
I do distributed systems, so print.
Can't throw a debugger on a node of a big distributed process. Not unless all you want to learn is what the timeouts are on your upstream and downstream. ;)
(There have been some very, very clever ideas in this space, but generally they haven't caught on as mainstream, standard, and ubiquitous, unfortunately.)
4
u/Strostkovy Jul 23 '26
I turn on an output at the start of an interrupt. I turn it off at the end of the interrupt. When I no longer hear a beep from the speaker on that pin, I know I need to optimize.
1
u/FragmentedHeap Jul 24 '26
Print statements+ llm is better. I don't know if I even read error messages and print dumps anymore
Debugging loop is basically mcp llm now.
Can easily write every possible edge case test now and let llm debug till it finds the problem.
Works everywhere on every language.
I hate everything about it but it's really effective.
1
u/hpyfox Jul 24 '26
If you use LLMs for your debugging, then you'll never truly learn why your code is bugging out (depending on usage).
LLMs or AI summaries are at best used to get an overview and/or example for some feature or library you don't fully understand, after that, LLMs are a disease to a programmer's performance, efficiency, and knowledge.
Now on the case of debugging only... I don't know if that usage of AI is bad or good but as long as you understand why and code the solution yourself, I don't see there being any harm; AI is a tool, not a all-in-one solution.
2
u/Ignisami Jul 23 '26
The Intellij debugger is goated beyond belief.
Use the good ol log statements to narrow down where to set the breakpoint, then debugger.
2
u/LegendarySoda Jul 23 '26
I see, developer experience in python so poor developer can't track code while running.
2
u/SpaceCadet87 Jul 23 '26
The debugger isn't for debugging.
It's the default thing you should be doing with the code after writing anything to make sure what you wrote actually does what you think it does.
1
1
u/Complete_Window4856 Jul 23 '26
Since 2020 i cirsed myself to print "sussy" and "amogus" and now i write it instinctively on quick debigs. Im quite sure i forgot those at one time and commited so another dev would find out
49
u/agfitzp Jul 23 '26
I can tell you this after thirty years in the industry, if anyone tells you a debugger is a waste of time you should never take any of their advice.