3 ms·
Use a real debugger instead of printing variables "Print real variables instead of using a debugger"
by vanusa 5y ago
Use a real debugger instead of printing variables
"Print real variables instead of using a debugger"
- DangitBobby 5y agoYou can pry log debugging from my cold dead hands.
- gromitss 5y ago
- arvinsim 5y agoI can justify using a debugger in a backend language like Python. But it's a pain in the ass for browser javascript that is generated from Typescript/Coffescript or whatever the flavor of the week is.
- hyperman1 5y agoThat's a bit of a strange one, indeed. I use a debugger to get a grip on other people's code, but if it's my own code, wanting a debugger points to not having thought hard enough. Printing variables on the other hand is an investment. You evolve to log statements dumping reasonably complete aspects of state, which are disabled in production. If things go bad, you can enable specific loggers even in production on part of your cluster. This way, troubleshooting in dev won't only fix a bug, it will train your logging to give the relevant info, and only the relevant info. Now dumping 50K lines of data and hunting specific values in an unstructured way, run after run after run, yeah, that's dumb. You've got a computer, the thing is good at filtering relevant data for you, you might as well use it.