-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using pytest.set_trace with iPython's TerminalInteractiveShell
#3289
Comments
TerminalInteractiveShell
I noticed that if I augment this line to be import ipdb;
ipdb.set_trace(frame) that works, just trying to figure out how to work that into the class that I'm passing in. |
passing is giving me an error: def Debugger():
import ipdb
return ipdb works and dumps me into a shell but then I cannot recover and it crashes when I try to end the exception
|
Seems this issue is somewhat similar to #3170 as downgrading pytest worked. I'll have to identify which caused the failure. def Debugger():
import ipdb
return ipdb worked as my pdbcls |
Hi @JBKahn, Can you post your failures please? |
@nicoddemus it was pytest-sugar. Using def Debugger():
import ipdb
return ipdb With It would be cool if we could potentially pass a class or a module but this isn't a difficult workaround. |
OK thanks for the follow up! |
Works -s argument for me |
We don't want to skip capture, so we use the debugger argument because we don't want to use |
Hey, I've been doing some fiddling around and haven't been able to make heads or tales of it. When looking at iPython's debugger class, I was able to find a flaw that I thought was causing it but it isn't.
I thought this file was imported at the wrong time, when we were still capturing and
_is_tty
was the wrong value, but I have verified that even if I hardcode that value, it still falls back to launching aPDB
shell instead. I know this is probably more of an iPython issue than a pytest issue but I was wondering if anyone wanted to give me a hand.This is the way I had tried to use it with the
pdbcls
arg.I verified with a print statement in the pip installed package that it was accessing that class.
The text was updated successfully, but these errors were encountered: