Re:The unreasonable effectiveness of print debugging
by 1337shadow on Saturday April 24, 2021 @12:55PM
(#26926353)
I just tried python -m pdb and it works for me https://dpaste.org/9EQo#L26 but I really always use breakpoint(). You can even configure it to use other debuggers with an environment variable, ie.: PYTHONBREAKPOINT=ipdb.set_trace
[ Parent
| on HN ]
Re:The unreasonable effectiveness of print debugging
by CJefferson on Saturday April 24, 2021 @12:59PM
(#26926393)
I just quickly went any checked the program I was trying to debug. I was running 'python3 package --arguments', where 'package' is the name of a directory which contains a package I was working on. 'python -m pdb package --arguments' just complains that 'package' is a directory.
Adding a 'breakpoint()' at the start of the program does get me into the debugger. I'll remember that for future (but, it's not easy to find by googling if you don't already know what you are looking for!)