News for hackers. Stuff that matters.
Re:Don't Look Down on Print Debugging by arkh on Saturday November 23, 2024 @09:48AM (#42221186)
The thing is, in interpreted languages land print debugging has a power no debugger gives you: live debugging on your production instance.

Something is broken in prod, you cannot reproduce it in your test environment because you think it may be due to a config (some signing keys maybe) you can't check. And it looks like someone forgot to put logs around whatever is the problem.

You can either: spend multiple hours trying to reproduce and maybe find the cause. Or take 5mn, bash into one of your nodes, add some logging live and have a result right now: either you have your culprit or your hunch is false.

Re:Don't Look Down on Print Debugging by waitforit on Saturday November 23, 2024 @10:36AM (#42221431)
> The thing is, in interpreted languages land print debugging has a power no debugger gives you: live debugging on your production instance.

Remote debugging is a thing that exists.

Re:Don't Look Down on Print Debugging by gwervc on Saturday November 23, 2024 @09:56AM (#42221222)
With modern js stacks being somewhat compiled anyway, and the backend often being C# or Java I don't think that case is very applicable. Not to mention developers logging on production servers and making whatever changes they want being a huge red flag.
Re:Don't Look Down on Print Debugging by plorkyeran on Saturday November 23, 2024 @01:55PM (#42222901)
If you can ssh into one of your production nodes and modify the code to add some logging, you can also attach a debugger to your production node.