Questions tagged [pudb]

PuDB is a full-screen, console-based visual debugger for Python

39 questions
24
votes
2 answers

Using Python PuDB debugger with pytest

Before my testing library of choice was unittest. It was working with my favourite debugger - PuDB. Not Pdb!!! To use PuDB with unittest, I paste import pudb;pudb.set_trace() between the lines of code. I then executed python -m unittest…
yagger
  • 2,975
  • 1
  • 16
  • 21
20
votes
1 answer

How to make the command-line / interpreter pane/window bigger in pudb?

Is there any way to resize the command-line / interpreter window/pane in pudb, just like the size of the side pane can be adjusted?
Rob Bednark
  • 25,981
  • 23
  • 80
  • 125
14
votes
1 answer

How to repeat the last command on the command-line in the python debugger, PuDB

I'm on Linux and expected it to work like pdb, gdb, i.e., press enter to repeat the last command. I understand the debugger has a Variables watch window.
auro
  • 1,079
  • 1
  • 10
  • 22
14
votes
3 answers

How to debug unittests with pudb debugger?

I am having some trouble trying to debug some unit tests through the pudb debugger. The tests run fine with python, but I had no luck runnign them with pudb. I isolated the problem, getting to the following sample code: class Math: def pow(self,…
Elias Dorneles
  • 22,556
  • 11
  • 85
  • 107
8
votes
1 answer

How to watch a variable in pudb?

I'm debugging a python script, and I want to watch a variable and get notified whenever its value changes. Is there a way to do this in pudb?
Jeff Widman
  • 22,014
  • 12
  • 72
  • 88
7
votes
0 answers

NameError: name 'fcntl' is not defined

I've installed PuDB on python 3.4.2 which is in virtualenv and running on windows 7 sp1. I first activate virtualenv workon env01 then enter to python console python now I need to test PuDB as following >>> import pudb >>> pudb.set_trace() and I…
Serjik
  • 10,543
  • 8
  • 61
  • 70
7
votes
1 answer

Running pudb inside docker container

I prefer pudb for python debugging. I am building python applications that run inside docker container. Does any one know how to make pudb available inside docker container? Thank you
DarcliGht
  • 1,399
  • 2
  • 10
  • 14
5
votes
2 answers

How can I select or change the theme on pudb (Python Debugger)?

I've been using pudb to debug python code, it's pretty straight forward and into the terminal. But I don't like the colors it has at all. It is something like the image below. I found in the folder inside .local/lib/python3.8/site-packages/pudb a…
5
votes
1 answer

Lost in pudb command line area

I'm starting to use pudb for Python debugging. It comes up fine, and I can step through, and it stops at breakpoints I put into code with pudb.set_trace(). So far so good. The main problem I'm having is this: If I hit ^X to get to the command-line…
TextGeek
  • 1,196
  • 11
  • 23
5
votes
2 answers

How to debug a python module that needs to be executed with -m?

Every debugger I tried out there expects a source file to debug. However Python does not always work this way. I have a module that is a folder with __init__.py and __main__.py files inside, among others, and I usually execute that this way: $ cd…
Yajo
  • 5,808
  • 2
  • 30
  • 34
5
votes
3 answers

Nice general way to always invoke python debugger upon exception

I'd like to have my debugger run post_mortem() any time an exception is encountered, without having to modify the source that I'm working on. I see lots of examples that involve wrapping code in a try/except block, but I'd like to have it always…
Captain Midday
  • 659
  • 8
  • 18
5
votes
4 answers

inspect complex variable in python debugger, like pudb

How could I inspect complex variable (list, dict, object) value with python debugger, I am new to python, I tried pudb, it looks like when the variable type is complex type, the debugger only show type of the variable, not the value. Is it possible…
fuyi
  • 2,573
  • 4
  • 23
  • 46
4
votes
1 answer

PuDB: Changing the window width?

PuDB allows windows to be resized vertically with the "+/-/=" keys. How do I resize horizontally, changing the relative widths of the windows?
Mark Harrison
  • 297,451
  • 125
  • 333
  • 465
4
votes
1 answer

Robot Framework debug python code using PUDB

I'm trying to debug python code executed from Robot. As was mentioned here by Bryan Oakley, there is possibility to debug it using: import sys, pdb; pdb.Pdb(stdout=sys.__stdout__).set_trace() This is a good solution and it helps a lot. Also there…
catoleg
  • 43
  • 1
  • 4
3
votes
2 answers

How can I debug my python unit tests within Tox with PUDB?

I'm trying to debug a python codebase that uses tox for unit tests. One of the failing tests is proving difficult due to figure out, and I'd like to use pudb to step through the code. At first thought, one would think to just pip install pudb then…
Vivek Gani
  • 1,283
  • 14
  • 28
1
2 3