Questions tagged [ipdb]

Interactive Python Debugger, IPython-interface to pdb

ipdb exports functions to access the IPython debugger, which features tab completion, syntax highlighting, better tracebacks, better introspection with the same interface as the pdb module.

192 questions
7
votes
3 answers

Subsequent "list" commands in ipdb

I just noticed an odd behavior when using l (i.e. the list command) in ipdb. I think I have seen something similar with the Perl debugger in the past, but it still puzzles me. The first time I inoke it shows corerectly ~10 lines of code around the…
Amelio Vazquez-Reina
  • 91,494
  • 132
  • 359
  • 564
6
votes
1 answer

ipython debugger: full traceback on interactive pdb?

I recently switched from ipython0.10 to ipython0.11. In ipython0.11, I only see a small snippet of the full traceback when the python debugger engages (i.e. using %pdb), whereas in ipython0.10 I'd see the full traceback. As far as I can tell, the…
keflavich
  • 18,278
  • 20
  • 86
  • 118
6
votes
1 answer

debugging python code while doing unitest using ipdb ResourceWarning

I have a python code that workes well on Ubuntu 16. I installed Ubuntu 18 and now when I try to debug the code while doing unitest I get the following warning each time I press 'n' or 's': ipdb> /usr/lib/python3.7/asyncio/base_events.py:618:…
6
votes
1 answer

Execute user-input pdb or ipdb commands programmatically in Python

I'm working with a PyQt application, so before debugging can begin, in the Python file, I have the lines pyqtRemoveInputHook() to stop the event loop and then ipdb.set_trace(). This enters the interactive debug session via the terminal. When done…
Dustin
  • 61
  • 2
6
votes
2 answers

How can I get method's "args" argument value in while using ipdb?

In ipdb using command a or args prints information on provided arguments for the method. How do I get actual args variable so I can work on the provided data? For example when I have code: class A(object): def test(*args, **kwargs): …
6
votes
2 answers

Python Debugger which supports Black Boxing?

If I use the debugger, most of the times I just want to see what the interpreter does in my code. I want to step over all code of the framework and libraries I use. AFAIK this is called Black Boxing. How can I do this with Python ipdb or an other…
guettli
  • 25,042
  • 81
  • 346
  • 663
6
votes
1 answer

ipdb, multiple threads and autoreloading programs causing ProgrammingError

I am using ipdb debugger to debug multithreaded web applications locally (Django, Plone). Often ipdb seems to get confused because of the autoreload which happens when I am on the debug prompt. The resulting stack trace comes…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
5
votes
2 answers

ipython debugger is flooded with Qt errors after pylab import

I can't use the debugger in ipython after importing anything pyqt related. If I don't import anything and debug an error post-mortem like $ ipython3 In [1]: abc --------------------------------------------------------------------------- NameError …
clemisch
  • 967
  • 8
  • 18
5
votes
1 answer

SQLite objects created in a thread can only be used in that same thread with Django 2.2.2 and ipdb

I updated my Django project to version 2.2.2 and now when I call to ipdb for debugging, the server tell me that error. If I go back to Django 2.2.1, the error disappears. System check identified no issues (0 silenced). June 06, 2019 -…
LyNDe
  • 51
  • 2
5
votes
1 answer

%debug in Jupyter Notebook - accessing missing traceback frames

When I try to debug my code in Jupyter Notebook with %debug I hit the "Oldest frame". > $HOME/anaconda3/envs/py36/lib/python3.6/site-packages/matplotlib/axes/_base.py(244)_xy_from_xy() 242 if x.shape[0] != y.shape[0]: 243 …
abukaj
  • 2,582
  • 1
  • 22
  • 45
5
votes
0 answers

Python: Is it possible to debug with breakpoints across modules in Spyder?

I use the ipython debugger interactively in Spyder. I need to debug with breakpoints across modules i.e. I'd like the debugger to step into a function that is contained within a particular .py file which isn't the .py file I start the debugger…
5
votes
2 answers

How to skip over line throwing exception when debugging

# process_with_huge_time_overhead() list_a = [1,2,3] print(list_a[3]) # process_with_huge_time_overhead() new_data = [5,6,7] list_a += new_data After reaching this line in ipdb (invoked via python -m ipdb script.py), the exception is thrown:…
SwimBikeRun
  • 4,192
  • 11
  • 49
  • 85
5
votes
2 answers

In ipdb, how to query a variable which as the same name as a command?

I'm trying to debug a function quicksort(A, l, r) which has a local variable called l. However, in ipdb that also corresponds to a command to view the code around the current line. So I'm seeing something like this: ipdb> dir() ['A', 'ipdb', 'l',…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
5
votes
1 answer

Debugging Jupyter notebook: stepping through a cell

In a blank Jupyter notebook I enter the following code in a cell: from IPython.core.debugger import set_trace set_trace() print("hello") After running the cell, I get into debug mode (first screenshot). I want to step to the next line, so I use the…
matthiash
  • 3,105
  • 3
  • 23
  • 34
5
votes
0 answers

Issue Debugging Jupyter Notebook Using ipdb & Tracer

I have been running into issues when using the debugger within Jupyter Notebook, Specifically this command: from IPython.core.debugger import Tracer Tracer()() #this one triggers the debugger Whenever I use Tracer()() the inline debugger shows as…
joshf
  • 251
  • 1
  • 3
  • 6