Sticky by default not working with pytest
See original GitHub issueRecently I’ve noticed that when placing a debugger inside a test I am not greeted with pdbpp’s wonderful sticky mode which I have as an always on default in my pdbrc but instead I’m greeted with this:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[39] > /Users/joshwren/REDACTED/main.py(60)get_app()
-> app = aiohttp.web.Application(
5 frames hidden (try 'help hidden_frames')
> /Users/joshwren/REDACTED/main.py(60)
** Error in inspect.getsourcelines: 'function' object has no attribute 'endswith' **
(Pdb++)
Now this is not catastrophic as I am indeed inside my lovely python debugger of choice and if I were to use the next keyword the debugger would suddenly be in sticky mode but just one line later than I intended. I’ve localized the issue to be happening only when debugging inside pytest as my sticky by default works in any other non pytest capacity. I’ve tried googling this every few days but to no avail. Also of note is that I’ve recently switched to an m1 mac which has been full of incompatibility challenges that have been stubborn but not impossible to fix so I would not be surprised to find this to be a side effect related to apple silicon as none of my other python peers use the same cpu.
pdbpp==0.10.3 pytest==7.1.2
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5
I’m also having the same issue on an M1.
Here, it works when I call a test this way:
and have a file
~/.pdbrc.py
with the following content:What I’m using: