问题描述
尝试查找如何执行ipdb(或pdb)命令,例如 disable
.
Trying to find how to execute ipdb (or pdb) commands such as disable
.
在 disable
上调用 h
命令说
那我该如何获得这些bp数字?正在查看命令列表,却无法显示bp数字
So how whould I get those bp numbers? was looking through the list of commands and couldn't get any to display the bp numbers
break
, b
和 info断点
命令不执行任何操作,尽管在我的模块中我显然设置了1个这样的断点,如导入pdb;pdb.set_trace()
-与 ipdb
相同.此外,未定义 info
.
The break
, b
and info breakpoints
commands don't do anything, although in my module i clearly have 1 breakpoint set like this import pdb; pdb.set_trace( )
- same for ipdb
. Moreover info
is not defined.
pdb
中的 help
的输出:
其他帮助主题:========================== exec pdb
Miscellaneous help topics: ========================== exec pdb
未公开的命令:====================== retval rv
Undocumented commands: ====================== retval rv
对于 ipdb
:
其他帮助主题:========================== exec pdb
Miscellaneous help topics: ========================== exec pdb
未公开的命令:====================== retval rv
Undocumented commands: ====================== retval rv
我将模块另存为pb3.py,并在这样的命令行中执行它
I have saved my module as pb3.py and am executing it within the command line like this
如果需要更多信息,我会提供.
If more info is needed, i will provide it.
推荐答案
使用 break
命令.不要添加任何行号,它会列出所有行号而不是添加它们.
Use the break
command. Don't add any line numbers and it will list all instead of adding them.
这篇关于如何在pdb(ipdb)中找到断点编号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!