29 ms·
I just tried python -m pdb and it works for me https://dpaste.org/9EQo#L26 https://dpaste.org/9EQo#L26 but I really always use breakpoint(). You can even config
by 1337shadow 5y ago
I just tried python -m pdb and it works for me https://dpaste.org/9EQo#L26 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
- CJefferson 5y agoI 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!)