Hello,
I’d like to float the idea of making the pdb prompts configurable.
Debuggers such as gdb and lldb have a feature to configure the
prompts that are used. When running in Bash, for example, this permits UX improvements
such as using colours in prompts and changing the terminal window title.
The Python debugger doesn’t have an option for this at present.
In the pdb code, the line_prefix
variable is defined
outside the Pdb class definition, but other prompts (e.g. (Pdb)
and
(com)
) are defined within the class, so can’t be easily changed.
This could be implemented by defining the other prompts outside the class
definition also, so that users could set the prompts in their PYTHONSTARTUP
file. Alternatively, a configuration command similar to the current alias
command could be added, allowing users to define prompts in a .pdbrc
file.