Re:Implementing Rust's dbg! in Python
by breuleux on Friday December 11, 2020 @01:42PM
(#25389092)
For what it's worth, I made a Python package that lets you combine both approaches: https://github.com/breuleux/breakword. You run your program once to print out what's going on, but it also displays a unique word next to each line and on a second run you can set a breakpoint at any of these words to investigate deeper. It's pretty handy when you spot an issue at the hundredth invocation of some function deep in the program's execution.
[ Parent
| on HN ]