Starting the debugger without breaking¶
To start the debugger without actually pausing use:
from pudb import set_trace; set_trace(paused=False)
at the top of your code. This will start the debugger without breaking, and
run it until a predefined breakpoint is hit. You can also press
b on a
set_trace call inside the debugger, and it will prevent it from stopping
Ctrl-c) to run
set_trace, so that
Ctrl-c while your code is running will break the code and start
debugging. See the docstring of
set_interrupt_handler for more
information. Note that this only works in the main thread.
At the programming language level, PuDB displays the same interface
as Python’s built-in pdb module.
run is called
Controlling How Values Get Shown¶
Set a custom stringifer in the preferences.
An example file might look like this:
def pudb_stringifier(obj): return "HI"
Add a method
safely_stringify_for_pudbto the type.
A stringifier is expected to never raise an exception. If an exception is raised, pudb will silently fall back to its built-in stringification behavior.
A stringifier that takes a long time will further stall the debugger UI while it runs.