Live data from Hacker News

The unreasonable effectiveness of print debugging

buttondown.email

1–10 of 366 posts

Re: The unreasonable effectiveness of print debugging

#6
Besides "behaviour in time", print debugging is effective because it's typically an extract of the most interesting for programmer things. I have a debugger window open this very moment and I can see about a hundred lines with various information about one structure, but I'm interested only in two (and I have to rerun this several times, because state got corrupted somewhere earlier).

Re: The unreasonable effectiveness of print debugging

#8
Qt Creator debugger fails on me constantly, it's 2021 and the leading C++ plaf. is completely unreliable in that many more cases.

That's why 'I must' use print debugging, because the 'powers that be' still provide a broken, half-baked solution 30 years in.

Print debugging is however so powerful, I think there almost should be a mechanism built into languages and tooling around it so that it becomes part of the process instead of a 'kind of workaround'. It's something we all do, constantly, and yet you'll never hear about it when people are arguing about Rust or Go.

Re: The unreasonable effectiveness of print debugging

#9
post #5

Why "unreasonable"? There's nothing unreasonable nor wrong about print debugging. Moreover, it's a great first step towards logging and testing.

"Unreasonable" here means that it works way better than it should for something so simple. It's a somewhat common phrasing. Example: "The Unreasonable Effectiveness of Data" https://static.googleusercontent.com/media/research.google.c...

Re: The unreasonable effectiveness of print debugging

#10
So I'd be curious. I usually work in scripted languages Bash, Ruby, JS (bleh) a bit of python.

Sometimes I do some Java work though and I usually end up going to print debugging because trying to figure out all the Java logging framework, or not ending up like 40 layers deep in some magic framework dependency that is interecepting my code which is what always happens when I use a debugger.

That being said do those who work in compiled languages make more heavy use of debuggers?

Post reply on HN