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
10
votes
1 answer

difference between ipdb and pdb++?

Python has its default debugger called pdb, but there are a few alternatives created by the community. Two of them are ipdb and pdb++. They seem to cater to the same audience, they can both be run directly at the CLI and provide some niceties such…
barzilay
  • 168
  • 2
  • 12
9
votes
3 answers

Update a function during debugging (pdb or ipdb)

Imagine I am debugging the following script: import ipdb def slow_function(something): # I'm a very slow function return something_else def fast_function(something_else): # There's a bug here return final_output something =…
Edgar Derby
  • 2,543
  • 4
  • 29
  • 48
9
votes
1 answer

Interactive debugging in IPython (Jupyter) notebook

For debugging my python code, I use the ipdb library, and use the set_trace() command to place a break point. Once the code reaches there, I get an interactive shell with ipdb> prompt, that I can explore local variables with tab autocompletion. In…
motam79
  • 3,542
  • 5
  • 34
  • 60
8
votes
1 answer

Debug and list all coroutine pending by future in python asyncio

I have a production code that heavily used asyncio.semaphore module which is suspected to have deadlock problem. I already found some solution of how to attach to running python code with unix signal, debug with ipdb.set_trace() and list all tasks…
RainJay
  • 81
  • 1
  • 3
8
votes
3 answers

Error installing ipdb for Python 2.7 using virtualenv and pip

When I tried to install ipdb, I had the following problem: $ pip install ipdb Collecting ipdb Using cached ipdb-0.10.3.tar.gz Complete output from command python setup.py egg_info: error in ipdb setup command: Invalid environment marker:…
Alexander Fedotov
  • 955
  • 12
  • 19
8
votes
0 answers

How to debug Tornado application with pdb or ipdb?

I'm use Tornado ioloop to develop application, when it comes to http_client.fetch's callback, I want to start pdb with import pdb; pdb.set_trace(), But an exception is raised: >…
leeyiw
  • 414
  • 2
  • 6
  • 14
8
votes
1 answer

Tab completion in ipython for list elements

Here is how tab completion is working for me: In [84]: a="string" In [85]: b = ["str", "ing"] Tab completion for strings is working here: In [86]: a. a.capitalize a.decode a.expandtabs a.index a.isdigit a.istitle a.ljust …
Wakan Tanka
  • 7,542
  • 16
  • 69
  • 122
8
votes
1 answer

Save breakpoints to file

When debugging my Python code, I run a script through ipdb from the commandline, and set a number of breakpoints. Then I make some changes in one or more modules, and rerun. However, if I simply use run modules do not get reloaded. To make sure…
gerrit
  • 24,025
  • 17
  • 97
  • 170
8
votes
1 answer

Make 'interact' use IPython console, rather than standard Python one?

In pdb/ipdb debugging, the useful interact command gives me a fully featured interactive Python console. However, this appears to always be the "standard" Python console, even if I use ipdb to begin with. Is there a way to configure ipdb such that…
gerrit
  • 24,025
  • 17
  • 97
  • 170
7
votes
1 answer

Run ipdb with seperate terminal in pycharm

Information I faced an annoying thing with PyCharm in the last couple of days. I'm trying to use ipdb to debug my program instead of pycharm debugger but I can only open it in thepycharm i/o console or in the python console. Question Is there anyway…
Reznik
  • 2,663
  • 1
  • 11
  • 31
7
votes
0 answers

ipdb: RuntimeWarning: 'ipdb.__main__' found in sys.modules after import of package 'ipdb'

I am using ipdb to debug my python like below: python -m ipdb my_test.py -d my_input_config -o my_output and got the following errors: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py:125: RuntimeWarning: 'ipdb.__main__'…
Edamame
  • 23,718
  • 73
  • 186
  • 320
7
votes
2 answers

How to properly exit ipdb interactive console in Jupyter Notebook?

Hi, what's the proper way to exit ipdb interactive console running in a Jupyter Notebook cell? I've tried exit, quit, Ctrl-Z, Ctrl-C, Ctrl-D (throws up the bookmark request in chrome) Update: Tried sys.exit(), it killed the kernel of the notebook.…
Stark
  • 2,581
  • 2
  • 17
  • 20
7
votes
1 answer

IPython help functionality in ipdb debugger

Help is available in a standard IPython shell via the help command or by using the ? character. For example, for help on the built-in sum function, either of the below commands in an IPython shell could be used. In [1]: help(sum) Help on built-in…
Russell Burdt
  • 2,391
  • 2
  • 19
  • 30
7
votes
3 answers

History across ipdb sessions

This question has been asked before, but I couldn't find a good answer. So, I am trying to ask again. I would like my ipdb to remember commands across sessions. Right now, it can pull up commands executed in Ipython sessions but not from old ipdb…
Phani
  • 3,267
  • 4
  • 25
  • 50
7
votes
1 answer

What does '*** Oldest frame' mean in ipdb?

I am trying to make http requests to a server and examine the content I get back. However, when I try poking around the HTTPResponse object with ipdb, I keep getting *** Oldest frame and I cant run any of the functions on the object that I should be…
Houdini
  • 3,442
  • 9
  • 31
  • 47
1 2
3
12 13