I'm writing a python package and I want to use pdb to debug it. When I try to set break point in one of the files, I get an error:
The specified object 'CaptureManager.frame' is not a function or was not found along sys.path
I googled it, and found a solution:
append the directory which contains my file into sys.path
sys.path.append(os.path.join(os.getcwd(),"project_cameo"))
But after few times, I get very annoyed, because I have to do it every time I restart my debug session. Is there a 'smart' way of doing it?
According to this answer you can also set a break point by writing the full path to filename (or path relative to directory on sys.path
)
For example
b /path/to/module.py:34
> Breakpoint 1 at /path/to/module.py:34
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With