This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author matrixise
Recipients matrixise, r.david.murray
Date 2017-09-27.13:17:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi David,

It's my fault and you are right, I didn't give the right description.

By default when you want to list the source code with pdb, you will use the list command but this one is just limited to the 10 next lines and there is no possibility to change this limit of 10 lines.

We can play with the second parameter of pdb, examples:

* list 10, 11
will show the code from the line 10 to 11

* list 10, 50
will show the code from the line 10 to 50

* list 10, 5
will show the code from the line 10 and the next 5 lines.

* list
will show from the current position and the next 10 lines.

and my first question was, why this limit exists? Could we change that?

after, I have read the doc of gdb and I have seen there was a "set linesize count" option where you can configure the number of lines to show.

Here is the reason of my proposal.

For the configuration of pdb, I am interested, I know we can use the .pdbrc file but it is really interesting if we desire to add new aliases or add new commands for the breakpoints.

Here is an other example for this issue:

./python -m pdb
-> import os
(Pdb) listsize 5
List size: 5
(Pdb) l
  1  ->	import os
  2  	import sys
  4  	def main():
  5  	    print(f"CWD: {sys.getcwd()}")
  6  	    print(f"PID: {sys.getpid()}")
(Pdb) l
  8  	if __name__ == '__main__':
  9  	    main()
Date User Action Args
2017-09-27 13:17:48matrixisesetrecipients: + matrixise, r.david.murray
2017-09-27 13:17:48matrixisesetmessageid: <>
2017-09-27 13:17:48matrixiselinkissue31607 messages
2017-09-27 13:17:48matrixisecreate