Trevor Boyd Smith
Trevor Boyd Smith

Reputation: 19273

Does Python have a .pdbinit file (similar to .gdbinit file)?

With gdb there is a .gdbinit[1] file that you can put lots of things that are important/necessary for more complex debugging sessions.

For example my recent Python debugging session required:

Does Python have a .pdbinit file (similar to .gdbinit file)?

I would like to at the very least put a list of breakpoints into the .pdbinit file so that I do not have to type in a 2-10 or N breakpoints.


foot notes:

[1] for those of you not familiar with what is a .gdbinit file here is some information:

Upvotes: 2

Views: 86

Answers (1)

Utkonos
Utkonos

Reputation: 795

I think the closest file to .gdbinit is .pdbrc. This is where one can store aliases to make debugging more convenient. However, one can write arbitrary code in this file that can be used to extend the pdb debugger.

Most of the tutorials about this file cover aliases in detail, but you may be able to find a way to implement the requirements that you're seeking.

Upvotes: 2

Related Questions