##// END OF EJS Templates
Merge pull request #12833 from meeseeksmachine/auto-backport-of-pr-12826-on-7.x...
Matthias Bussonnier -
r26347:bd4d0a4f 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.
@@ -796,6 +796,20 b' class Pdb(OldPdb):'
796 do_d = do_down
796 do_d = do_down
797 do_u = do_up
797 do_u = do_up
798
798
799 def do_context(self, context):
800 """context number_of_lines
801 Set the number of lines of source code to show when displaying
802 stacktrace information.
803 """
804 try:
805 new_context = int(context)
806 if new_context <= 0:
807 raise ValueError()
808 except ValueError:
809 self.error("The 'context' command requires a positive integer argument.")
810 self.context = new_context
811
812
799 class InterruptiblePdb(Pdb):
813 class InterruptiblePdb(Pdb):
800 """Version of debugger where KeyboardInterrupt exits the debugger altogether."""
814 """Version of debugger where KeyboardInterrupt exits the debugger altogether."""
801
815
General Comments 0
You need to be logged in to leave comments. Login now