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.
Overriding default key bindings#
Configure in the settings file (see FAQ).
Add the bindings under mentioned section in the config file (see Keyboard Input).
Only few actions are supported currently, coverage will increase with time. (Contributions welcome!)
[pudb] # window chooser bindings hotkeys_breakpoints = B hotkeys_code = C hotkeys_stack = S hotkeys_variables = V hotkeys_toggle_cmdline_focus = ctrl x