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
1
vote
1 answer

Editing source whilst debugging in Spyder

I regularly use Spyder's built in debugging. I find that whilst I am stepping through a program, I often want to make changes to the source. However, this will put the current line in the code editor (the line of code whose line number is bold) out…
Max888
  • 3,089
  • 24
  • 55
1
vote
1 answer

python ipdb.set_trace() one frame "up" (frame=?)

Sometimes when I invoke ipdb, I know I want to be a frame above where the trace is set. I presume that's why the API exposes the frame parameter (as discussed in the documentation). So here's the function: import inspect, ipdb def…
HaPsantran
  • 5,581
  • 6
  • 24
  • 39
1
vote
3 answers

Shortcut for invoking ipdb?

ipdb is just great; wow. The thing is, when a script blows up, I still have to go into the code and add four lines that require not a ton of typing, but not nothing either. For example, let's say this is the bad line: 1 = 2 Naturally, I get…
HaPsantran
  • 5,581
  • 6
  • 24
  • 39
1
vote
0 answers

pyqt5 application won't drop into a debugger - just crashes

I'm trying to write a pyqt5 application. It throws an exception from the Python side in a slot (i.e. callback) that responds to the user clicking a button. I run the application with python -m pdb myapp.py which begins with # myapp.py import…
Noah
  • 196
  • 10
1
vote
0 answers

pudb error, ipdb and pdb no error.

I am switching tool-chains, from an eclipse based python ide to a vim based equivalent. I am currently experimenting with pudb. I am trying to step through some code google gives as examples for tensorflow. It runs in a venv, on python3.5. None…
alphaXed
  • 21
  • 3
1
vote
0 answers

Obtain current module after it's been overwritten in sys.modules?

I have a script I'm trying to run from the command line: import ipdb def f(): pass import pickle pickle.dumps(f) This is of course simplified. In reality I'm trying to use f in a multiprocessing.Pool, hence the need to pickle it. With ipython 5.3.0…
nonagon
  • 3,271
  • 1
  • 29
  • 42
1
vote
0 answers

How can I use the python debugger in Jupyter Notebook?

I use the %pdb command, but when I enter commands such as up or p to in the toggled ipdb, I get *** Oldest frameinstead of moving the arrows up and down like the regular debugger. How can I set the tracer to inspect all code in the notebook? Thanks…
russel
  • 303
  • 2
  • 3
  • 9
1
vote
0 answers

Attempting to debug terminal applications made with Python+Blessed using ipdb breaks IPython?

I am using the Blessed library to build a simple terminal application. My application builds upon the following simple example for a dumb editor: https://github.com/jquast/blessed/blob/master/bin/editor.py Warning: the following steps will break…
bzm3r
  • 3,113
  • 6
  • 34
  • 67
1
vote
2 answers

ipdb is triggering ImportError

ipdb is triggering an import error for me when I run my Django site locally. I'm working on Python 2.7 and within a virtual environment. which ipdb shows the path (/usr/local/bin/ipdb), as does which ipython, which surprised me since I thought it…
thumbtackthief
  • 6,093
  • 10
  • 41
  • 87
1
vote
0 answers

What subtleties does pdb / ipdb introudce to PySide?

I have two PySide programs that use a UI with many of the same elements. I've constructed a UI that imports several shared QGroupBox and one that differs. One program works, the other locks up before the GUI appears, and no longer responds to…
Ubuntourist
  • 775
  • 11
  • 26
1
vote
1 answer

How does pdb/ipdb handle the debugging stdin/stdout

I have a nodejs script that runs a python program. I'd like to be able to interact with pdb when the debug sessions starts. I'm using this to start my process: var cp = require('child_process') var app = cp.spawn('python_app', ['param']) …
Loïc Faure-Lacroix
  • 13,220
  • 6
  • 67
  • 99
1
vote
0 answers

Any way to go to previous error with ipdb/pdb?

All to often, I am trying to debug something, and I forget to type debug and jump right to typing a debug command, e.g. u and then I get NameError: name 'u' is not defined And I can no longer debug the original error, only this NameError. So I…
capybaralet
  • 1,757
  • 3
  • 21
  • 31
1
vote
1 answer

Is the python ipdb package available inside another package?

I can't install the ipdb package because it's on a server over which I have no control. I want to make the following work. import other.module.ipdb as ipdb print 'hello' ipdb.set_trace() print 'world' Ipython is installed which makes me think I…
evan54
  • 3,585
  • 5
  • 34
  • 61
1
vote
1 answer

Disable vim bindings in python ipdb

After installing this dotfiles repo with vim, zsh, git plugins my ipdb has vim key bindings instead of normal bindings. Navigation with arrows is quite broken and now it sometimes enters modes like VIM ( typing / normal ). I was advised to check…
koleS
  • 1,263
  • 6
  • 30
  • 46
1
vote
1 answer

Make ipdb prompt colored

How to make ipdb prompt colored? It's difficult to navigate between prints:
warvariuc
  • 57,116
  • 41
  • 173
  • 227