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
5
votes
2 answers

Can't type in ipdb console in docker container

I'm using docker-compose to build my docker container and am running the container with the --service-ports flag like so: docker-compose run --service-ports $(service_name) -d When trying to call ipdb within a python script in the container using…
steve
  • 537
  • 1
  • 7
  • 17
5
votes
2 answers

how to halt python program after pdb.set_trace()

When debugging scripts in Python (2.7, running on Linux) I occasionally inject pdb.set_trace() (note that I'm actually using ipdb), e.g.: import ipdb as pdb try: do_something() # I'd like to look at some local variables before running…
nonagon
  • 3,271
  • 1
  • 29
  • 42
5
votes
1 answer

Python debuggers not stepping into a coroutine?

In the example below: import asyncio import ipdb class EchoServerProtocol: def connection_made(self, transport): self.transport = transport def datagram_received(self, data, addr): message = data.decode() …
TheMeaningfulEngineer
  • 15,679
  • 27
  • 85
  • 143
5
votes
1 answer

Ipdb not showing output with Django nose tests

I'm running the most recent version of ipdb 0.10.0 and when I run the my django test suite using the nosetests plugin, once I hit a import ipdb; ipdb.set_trace() call, I can't see the prompt. I've tried adding a '-s' parameter in the nose args,…
Ryu S.
  • 1,538
  • 2
  • 22
  • 41
5
votes
1 answer

Python Debugging Using Pdb

I'm using a interactive graphical Python debugger with ipdb under the hood (Canopy's graphical debugger). The script I am working on has multiple imported modules and several calls to their respective functions. Whenever I attempt a debugging run,…
Mr. Frobenius
  • 324
  • 2
  • 8
5
votes
2 answers

How to install ipdb with Anaconda on Windows?

I already have Python 2.7 installed but I wanted to try IPython so I installed IPython via Anaconda as recommended on the ipython website (although not sure what the pros/cons of doing this are). Now I would like to use ipdb debugger. I guess I…
User
  • 62,498
  • 72
  • 186
  • 247
5
votes
1 answer

Install ipdb for Python 3?

I installed ipdb using pip, but I am still getting ImportError: No module named ipdb. Do I have to do something else to bring this module in? Of course, I import ipdb at the top of my file as well. My thinking is this: I have Python 2.7 and Python…
Houdini
  • 3,442
  • 9
  • 31
  • 47
5
votes
0 answers

Running IPython magics in ipdb

Can I use IPython magics such as %paste and %cd in ipdb?. Is there any way to have ipdb interpret these magics in the command line?
prathamesh
  • 511
  • 6
  • 8
4
votes
0 answers

spyder debugging stops at the first line

this is my code a= 1+10 b =1+20 c=1+5 print(a) print ('hello') I set breakpoints on line 3 and line 5. However, when i run Debug (Ctrl + F5) in a Spyder Console, it got stuck as shown below even after I updated my Spyder: ----> 1 a= 1+10 2 b…
Hao Huang
  • 41
  • 3
4
votes
0 answers

Python debugging in jupyter notebook

I am trying to understand debugging in jupyter notebooks. As per my understanding applying breakpoint() is the way to go about it but I am landing into a few issues that I describe below. I have a file named test_debugger.py in ./ that I am using as…
figs_and_nuts
  • 4,870
  • 2
  • 31
  • 56
4
votes
2 answers

How to use list() when in an ipdb session?

In a Python 3.5.2 script where I have, e.g., import ipdb ipdb.set_trace() The interpreter hits these lines and drops me into an ipdb session. Understandably, ipdb has limited functionality compared to an iPython interpreter session (e.g., no magic…
Arthur
  • 345
  • 5
  • 12
4
votes
1 answer

django 3 - import ipdb; ipdb.set_trace() - Runtime Error

Just installed django-3.0, I'm used to insert ipdb to stop runtime and inspect functions. With previous version it was working fine. Is there any way to get it work? > /home/tec1/workspace/static_site/stagen/hmi/views.py(11)dispatch() 10 …
user2239318
  • 2,578
  • 7
  • 28
  • 50
4
votes
1 answer

How to make yield work in debug mode?

I am working with ipdb and yield. I noticed the yield does not act as expected when using it with ipdb. Specifically, this code when being debugged with ipdb (and pressing the 'n' charcter in the key board simply skips the yield command instead of…
avitheavi
  • 103
  • 1
  • 9
4
votes
0 answers

python multiprocessing Process is killed by http request if ipdb is imported

It seems simply importing ipdb when making an http request wrapped in a multiprocessing Process instance causes the program to exit with no errors or messages. The following script behaves very strangely: from multiprocessing import Process import…
kilgoretrout
  • 3,547
  • 5
  • 31
  • 46
4
votes
0 answers

using ipdb for debugging python inside emacs

import pdb; pdb.set_trace() works fine when I run M-x pdb python manage.py runserver However import ipdb would cause the above statement to hang indefinately.. I hear great things about ipdb, how do I use it under emacs? Edit Just found out…
eugene
  • 39,839
  • 68
  • 255
  • 489