Hacker News new | ask | show | jobs
by smt88 3 hours ago
Print-based debugging is worse in every way and also the wrong tool for the job.

You should absolutely be adding logging, including optional verbose logs, to code. It’s a form of self-documentation and a major convenience during maintenance.

But it doesn’t compete with or replace using a real debugger, which allows you to step through your stack at any point and see potentially many megabytes of state that you literally can’t consume from a text console.