Skip to content Skip to sidebar Skip to footer

Use Ipdb Instead Of Pdb With Py.test --pdb Option

I want to use ipdb instead of pdb with py.test --pdb option. Is this possible? If so, how? Clearly, I can use import ipdb; ipdb.set_trace() in the code but that requires to run the

Solution 1:

Use this option to set custom debugger:

--pdbcls=IPython.terminal.debugger:Pdb

It can also be included in pytest.ini using addopts:

[pytest]addopts = "--pdbcls=IPython.terminal.debugger:Pdb"

Solution 2:

Have you tried pytest-ipdb?

Looks like it's exactly what you are looking for?

Post a Comment for "Use Ipdb Instead Of Pdb With Py.test --pdb Option"