Add a commands
argument to pdb.set_trace
so the user can feed commands from source code
#120254
Labels
type-feature
A feature request or enhancement
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Proposal:
I propose to add a
commands
argument topdb.set_trace
andpdb.Pdb.set_trace
. Thecommands
fed should be a list of pdb commands that will be executed the first time the debugger is brought up - it's very similar to.pdbrc
.There are many use cases
.pdbrc
as debugging scripts, and sometimes it's not the best way because that would be the same for the whole directory. Being able to feed pdb commands can save user a lot of time re-typing all the commands after they try some fix.stdin
is not available, or not super convenient, this could help. For example, in testing. Also, I talked withpyodide
maintainer about supportingpdb
on webbrowser, and one of the issue was the lack ofstdin
. They successfully made it work with some workaround, but this could help the case.This feature is also trivial to implement and easy to maintain - all the pieces are already there.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
commands
argument topdb.set_trace
#120255The text was updated successfully, but these errors were encountered: