Commits

Antonio Cuni committed 9547ad8

a new feature: now you can type 'continue n' to continue the execution until line n'

  • Participants
  • Parent commits d08e269

Comments (0)

Files changed (2)

 
     do_l = do_list
 
+    def do_continue(self, arg):
+        if arg != '':
+            self.do_tbreak(arg)
+        return pdb.Pdb.do_continue(self, '')
+    do_c = do_cont = do_continue
+
     def do_pp(self, arg):
         width, height = self.get_terminal_size()
         try:

File testing/test_pdb.py

 # c
 """)
     
+
+def test_continue_arg():
+    def fn():
+        set_trace()
+        x = 1
+        y = 2
+        z = 3
+        return x+y+z
+    _, lineno = inspect.getsourcelines(fn)
+    line_z = lineno+4
+
+    check(fn, """
+> .*fn()
+-> x = 1
+# c %d
+Breakpoint 1 at .*/test_pdb.py:%d
+Deleted breakpoint 1
+> .*fn()
+-> z = 3
+# c
+""" % (line_z, line_z))