pdb调试时是否有办法执行下一行并显示下一个列表

时间:2018-07-09 17:49:00

标签: pdb

例如,执行以下步骤- 1.指针行号5 2.执行行号5 3.用指针在第六行列出下一行。

(Pdb) l
  1     import argparse
  2     
  3     if __name__ == '__main__':
  4         parser = argparse.ArgumentParser(description='An awesome program')
  5  ->     subparsers = parser.add_subparsers(
  6             title='subcommands', description='valid subcommands',
  7             help='additional help')
  8         parser_create = subparsers.add_parser('create')
  9         parser_create.set_defaults(which='create')
 10         parser_create.add_argument(
 11             '--first_name', required=True, help='First Name')
(Pdb) n
> /Users/ashish.kumar/Downloads/sub-args.py(6)<module>()
-> title='subcommands', description='valid subcommands',
(Pdb) l
  1     import argparse
  2     
  3     if __name__ == '__main__':
  4         parser = argparse.ArgumentParser(description='An awesome program')
  5         subparsers = parser.add_subparsers(
  6  ->         title='subcommands', description='valid subcommands',
  7             help='additional help')
  8         parser_create = subparsers.add_parser('create')
  9         parser_create.set_defaults(which='create')
 10         parser_create.add_argument(
 11             '--first_name', required=True, help='First Name')
(Pdb) 

因此,简而言之,是否可以同时执行step2 + step3?

0 个答案:

没有答案