Hacker News new | past | comments | ask | show | jobs | submit login

Almost all the reasons people use print debugging can be overcome by improving debuggers --- and to some extent already have been (in the words of William Gibson, the future is already here, it's just not evenly distributed yet). I think it's important for people to understand that the superiority of print debugging is contingent and, for many developers, will not persist.

Record-and-replay debuggers like rr [0] (disclaimer: I started and help maintain it), Undo, TTD, replay.io, etc address one set of problems. You don't have to stop the program; you can examine history without rerunning the program.

Pernosco [1] (disclaimer: also my baby) goes much further. Complaints about step debuggers (even record-and-replay debuggers) only showing you one point in time are absolutely right, so Pernosco implements omniscient debugging: we precompute all program states and implement some novel visualizations of how program state changes over time. One of our primary goals (mostly achieved, I think) is that developers should never feel the need to "step" to build up a mental picture of state evolution. One way we do this is by supporting a form of "interactive print debugging" [2].

Once you buy into omniscient debugging a world of riches opens to you. For example omniscient debuggers like Pernosco let you track dataflow backwards in time [3], a debugging superpower print debugging can't touch.

rr, Pernosco and similar tools can't be used by everyone yet. A lot of engineering work is required to support more languages and operating systems, lower overhead, etc. But it's important to keep in mind that the level of investment in these tools to date has been incredibly low, basically just a handful of startups and destitute open source projects. If the software industry took debugging seriously --- instead of just grumbling about the tools and reverting to print debugging (or, at best, building a polished implementation of the features debuggers have had since the 1980s) --- and invested accordingly we could make enormous strides.

[0] https://rr-project.org

[1] https://pernos.co/about/overview

[2] https://pernos.co/about/expressions

[3] https://pernos.co/about/dataflow




Post author here — just wanted to say I emphatically agree with this and have found your work on rr and Pernosco very inspiring! Anyone who hasn’t seen this work should check it out.


Thank you! I've recently started learning how to use rr and it's been amazing so far. I've written a tiny wrapper to parse cargo's output and run rr on the appropriate binary to reduce the friction a little[1]

I'd love to use pernosco, but it's too expensive for me. Do you have any sort of student discount?

[1]: https://crates.io/crates/cargo-rr


Use up your free sessions and if you want to use it more, email us at inquiries@pernos.co and we'll work something out.

Thanks for the cargo-rr crate, that looks nice.


I’ve said this before, but rr really is a superpower, and Pernosco doubly so. Definitely worth every penny.


> Almost all the reasons people use print debugging can be overcome by improving debuggers

speed and simplicity

https://www.youtube.com/watch?v=JXQZhyPK3Zw&t=1410s


These are important, but for larger projects "speed" is often not a feature of print debugging when you need multiple iterations of refining your logging statements.

"Simplicity", sure ... it's difficult to beat the simplicity of not using tools.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: