←back to thread

1087 points smartmic | 6 comments | | HN request time: 1.024s | source | bottom
Show context
titanomachy ◴[] No.44305194[source]
“Good debugger worth weight in shiny rocks, in fact also more”

I’ve spent time at small startups and on “elite” big tech teams, and I’m usually the only one on my team using a debugger. Almost everyone in the real world (at least in web tech) seems to do print statement debugging. I have tried and failed to get others interested in using my workflow.

I generally agree that it’s the best way to start understanding a system. Breaking on an interesting line of code during a test run and studying the call stack that got me there is infinitely easier than trying to run the code forwards in my head.

Young grugs: learning this skill is a minor superpower. Take the time to get it working on your codebase, if you can.

replies(48): >>44305342 #>>44305375 #>>44305388 #>>44305397 #>>44305400 #>>44305414 #>>44305437 #>>44305534 #>>44305552 #>>44305628 #>>44305806 #>>44306019 #>>44306034 #>>44306065 #>>44306133 #>>44306145 #>>44306181 #>>44306196 #>>44306403 #>>44306413 #>>44306490 #>>44306654 #>>44306671 #>>44306799 #>>44307053 #>>44307204 #>>44307278 #>>44307864 #>>44307933 #>>44308158 #>>44308299 #>>44308373 #>>44308540 #>>44308675 #>>44309088 #>>44309822 #>>44309825 #>>44309836 #>>44310156 #>>44310430 #>>44310742 #>>44311403 #>>44311432 #>>44311683 #>>44312050 #>>44312132 #>>44313580 #>>44315651 #
roncesvalles ◴[] No.44305375[source]
I'd love to use a real debugger but as someone who has only ever worked at large companies, this was just never an option. In a microservices mesh architecture, you can't really run anything locally at all, and the test environment is often not configured to allow hooking up a stepping debugger. Print debugging is all you have. If there's a problem with the logging system itself or something that crashes the program before the logs can flush, then not even that.
replies(5): >>44305439 #>>44305754 #>>44306109 #>>44310661 #>>44312810 #
frollogaston ◴[] No.44305439[source]
Same, this isn't my choice, debuggers don't work here. And we don't even have microservices.
replies(1): >>44310416 #
monkeyelite ◴[] No.44310416[source]
> debuggers don't work here

It’s impossible? Or would take engineering work to enable

replies(1): >>44311713 #
frollogaston ◴[] No.44311713[source]
It's not a realtime system kind of thing where the debugger would change the behavior too much... It's possible with enough engineering work, but nobody has put that work in, in fact they had a debugger for some staging envs that they deleted. Lately they keep adding more red tape making it hard to even run something locally, let alone attach a debugger.

I guess you can attach a debugger for unit tests, but that's not very useful.

replies(1): >>44314103 #
1. Kwantuum ◴[] No.44314103[source]
> I guess you can attach a debugger for unit tests, but that's not very useful.

That is in fact incredibly useful

replies(1): >>44314389 #
2. frollogaston ◴[] No.44314389[source]
Eh, it's there for those who want it, but nobody uses it
replies(1): >>44314732 #
3. monkeyelite ◴[] No.44314732[source]
See this just sounds like you do not have an engineering culture or learning, enabling, and using debuggers.
replies(2): >>44314984 #>>44315120 #
4. ◴[] No.44314984{3}[source]
5. frollogaston ◴[] No.44315120{3}[source]
Not sure what an engineering culture is, but I don't want it. I just want to attach a debugger to our stuff (not the unit tests).
replies(1): >>44319608 #
6. monkeyelite ◴[] No.44319608{4}[source]
*engineering culture of

It’s a similar muscle to exercise as using a profiler.