##// END OF EJS Templates
Merge pull request #12826 from MrMino/ipdb_set_context_command...
Matthias Bussonnier -
r26344:2ab39995 merge
parent child Browse files
Show More
@@ -0,0 +1,5 b''
1 New "context" command in ipdb
2 -----------------------------
3
4 It is now possible to change the number of lines shown in the backtrace
5 information in ipdb using "context" command.
@@ -806,6 +806,20 b' class Pdb(OldPdb):'
806 do_d = do_down
806 do_d = do_down
807 do_u = do_up
807 do_u = do_up
808
808
809 def do_context(self, context):
810 """context number_of_lines
811 Set the number of lines of source code to show when displaying
812 stacktrace information.
813 """
814 try:
815 new_context = int(context)
816 if new_context <= 0:
817 raise ValueError()
818 except ValueError:
819 self.error("The 'context' command requires a positive integer argument.")
820 self.context = new_context
821
822
809 class InterruptiblePdb(Pdb):
823 class InterruptiblePdb(Pdb):
810 """Version of debugger where KeyboardInterrupt exits the debugger altogether."""
824 """Version of debugger where KeyboardInterrupt exits the debugger altogether."""
811
825
General Comments 0
You need to be logged in to leave comments. Login now