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

Using IPython object? in ipdb

IPython provides handy object inspection tool, by writing object? to REPL. Can this be accessed in ipdb? It doesn't seem to be available as built-in command. Currently I see the help gives out just the standard pdb help: ipdb> help Documented…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
2
votes
1 answer

No autocompletion with the ipdb prompt when using Spyder

I'm using Spyder for my python programming. I'm having a problem when I use the debugfile (F7) command/function. Once in the ipdb prompt I have no autocompletion and the up arrow action (for the history of commands) does not work. When I'm using…
Tonio Bonnef
  • 143
  • 6
2
votes
0 answers

How to use python's gevent.monkey.path_sys() with ipdb debugger?

I am using python's gevent library and do not want raw_input (or more specifically the event loop in cmd.Cmd) to block when awaiting user input. So as a result I use gevent.monkey.patch_sys() to ensure that my other greenlets may run when waiting…
Rocketman
  • 3,464
  • 5
  • 27
  • 30
1
vote
0 answers

Shortest way to trigger an exception in Python

I would like to know the shortest possible way to throw an exception in Python that is not itself a SyntaxError. For context, I use an IPython shell for development while editing the source in a different file and use live reload to bring in the…
kimegitee
  • 11
  • 1
1
vote
1 answer

How to write a quickfix list to a file

I'm looking for a way to write content of a quickfix window to a file with a specific formatting, preferably in a way that is easily scriptable. What I'm trying to achieve is a very light integration of Vim and ipdb: I set 'breakpoints' as items on…
1
vote
2 answers

Trying to set ipdb.set_trace(): RuntimeError: There is no current event loop in thread 'Thread-....'

I'm using Miniconda 3 on Windows 7, trying to use ipdb to start debugging process in my program. I have installed IPython and ipdb of course (in virtualenv). Test program: #!/usr/bin/env python import ipdb def a(): for i in range(10): …
LetMeSOThat4U
  • 6,470
  • 10
  • 53
  • 93
1
vote
1 answer

How to restart ipdb while in debugging?

My main goal is to restart ipdb, which should continue on the beginning on the code and catch on the first break-point. # code.py val = 10 print(f"Hello_World {val}") __import__('ipdb').set_trace(context=5) print("Goodbye_World") run: $…
alper
  • 2,919
  • 9
  • 53
  • 102
1
vote
1 answer

can I debug modules step by step in Spyder?

Debugging works step by step only in the main script. Can I somehow see what is happening in the functions from the imported modules without moving their contents in my main script? For example I would like to see what's inside a,b&c…
Kosh
  • 960
  • 2
  • 13
  • 28
1
vote
0 answers

How to set up ipdb context in setup.cfg or .ipdb?

I am using python 3.71.rc1 on Windows 10 with ipdb version 0.13.2 and trying to setup default value for ipdb context in setup.cfg or .ipdb. What I did so far (without success) is: Created setup.cfg in project folder with single section ipdb and…
Blada-H
  • 57
  • 5
1
vote
1 answer

How to trace a function call in Python?

How do I track Python code from start to finish? That shows the entire flow of execution, from which function is called first, which operations are performed, to the end of the entire flow. Look at this example code, it receives an operation type…
1
vote
1 answer

Install ipdb to tox environment for development

I'm looking for a neat way to install ipdb in tox environments, when I'm using them for development. They're often recreated, so I need something other than single installation. Any hints?
ziima
  • 706
  • 4
  • 17
1
vote
0 answers

How to debug Tornado coroutine (asyncio)

I'm trying to debug a Tornado coroutine that, under the hood, uses an asyncio implementation. As debugger I'm using ipdb, so in my code I've inserted import ipdb; ipdb.setTrace() The code is: @coroutine def get(self, user_id, _user): user =…
alessandro308
  • 1,912
  • 2
  • 15
  • 27
1
vote
1 answer

How to continue running after correcting values when a bug occurs in ipython notebook debugging?

For example, def power(x, n): res = 1 for i in range(n): res *= x return res power('10',5) Then, it will raise the error as follows. TypeError: can't multiply sequence by non-int of type 'str' Now, I try to use %debug in the…
rosefun
  • 1,797
  • 1
  • 21
  • 33
1
vote
0 answers

Why can't ipdb be imported when using multiprocessing

I am not trying to use ipdb with multiprocessing, I had it imported before I started adding multiprocessing features and I couldn't figure out why the code wouldn't run. Here is a minimal example; from ipdb import set_trace as st import…
Clumsy cat
  • 289
  • 1
  • 12
1
vote
1 answer

Possible to print the IPDB/Celery-RDB stack trace ('where') to stdout from within the code?

Inputting 'w(here)' into the IPDB or RDB will print out a stack trace. Is there a way to do this without entering set_trace()? I guess what I'm imagining would be something like print(w), or otherwise simply printing the stacktrace at the point…
Jay Jung
  • 1,805
  • 3
  • 23
  • 46