In pdb how do you reset the list (l) command line count?

Late but hopefully still helpful. In pdb, make the following alias (which you can add to your .pdbrc file so it’s always available):

alias ll u;;d;;l

Then whenever you type ll, pdb will list from the current position. It works by going up the stack and then down the stack, which resets ‘l’ to show from the current position. (This won’t work if you are at the top of the stack trace.)

Leave a Comment