pdb 有像 gdb 一样的 "comm" 命令吗?
Does pdb have a "comm" command like gdb?
在 GDB 中,用户可以定义一些在遇到断点时自动 运行 的操作。例如,
b foo.cpp:100
comm 1
p x
end
pdb有没有类似的功能?
是的。在https://docs.python.org/2/library/pdb.html中,您可以找到:
commands [bpnumber]
Specify a list of commands for breakpoint number bpnumber. The commands themselves appear on the following lines. Type a line containing just ‘end’ to terminate the commands
在 GDB 中,用户可以定义一些在遇到断点时自动 运行 的操作。例如,
b foo.cpp:100
comm 1
p x
end
pdb有没有类似的功能?
是的。在https://docs.python.org/2/library/pdb.html中,您可以找到:
commands [bpnumber]
Specify a list of commands for breakpoint number bpnumber. The commands themselves appear on the following lines. Type a line containing just ‘end’ to terminate the commands