How do you watch a variable in pdb

data breakpoints with pdb …much like you can watch a memory address in gdb… GDB uses data breakpoints, this is made easy with hardware support (hardware watchpoints), this typically involves marking the memory pages read-only which then trips an exception handler on memory access. When hardware watchpoints are not available it uses software watchpoints, these … Read more

Attaching a process with pdb

At this time, pdb does not have the ability to halt and begin debugging on a running program. You have a few other options: GDB You can use GDB to debug at the C level. This is a bit more abstract because you’re poking around Python’s C source code rather than your actual Python script, … Read more

cannot override sys.excepthook

Five years after you wrote this, IPython still works this way, so I guess a solution might be useful to people googling this. IPython replaces sys.excepthook every time you execute a line of code, so your overriding of sys.excepthook has no effect. Furthermore, IPython doesn’t even call sys.excepthook, it catches all exceptions and handles them … Read more

Getting started with the Python debugger, pdb [closed]

Here’s a list of resources to get started with the Python debugger: Read Steve Ferb’s article “Debugging in Python” Watch Eric Holscher’s screencast “Using pdb, the Python Debugger” Read the Python documentation for pdb — The Python Debugger Read Chapter 9—When You Don’t Even Know What to Log: Using Debuggers—of Karen Tracey’s Django 1.1 Testing … Read more