有没有办法禁用 Python 调试器的 pdb 库 set_trace 默认别名?
Is there a way to disable Python debugger's pdb library set_trace default aliases?
有没有办法禁用默认的 pdb
库命令别名?我目前正在使用与 pdb
set_trace()
快捷方式别名同名的变量。例如,我有一个名为 s
的变量,但在使用 set_trace()
时 s
是 step
的快捷方式。这是许多像 a
和 n
中的一个默认别名,它们分别代表 args
和 next
。
所以当我试图通过输入 s
命令来检查我的 s
变量时,它运行 step
而不是我想要的。
谢谢!
引用 Pdb 文档:
! statement
Execute the (one-line) statement in the context of the current stack
frame. The exclamation point can be omitted unless the first word of
the statement resembles a debugger command.
如果我没记错的话,这应该是你想要的
有没有办法禁用默认的 pdb
库命令别名?我目前正在使用与 pdb
set_trace()
快捷方式别名同名的变量。例如,我有一个名为 s
的变量,但在使用 set_trace()
时 s
是 step
的快捷方式。这是许多像 a
和 n
中的一个默认别名,它们分别代表 args
和 next
。
所以当我试图通过输入 s
命令来检查我的 s
变量时,它运行 step
而不是我想要的。
谢谢!
引用 Pdb 文档:
! statement
Execute the (one-line) statement in the context of the current stack frame. The exclamation point can be omitted unless the first word of the statement resembles a debugger command.
如果我没记错的话,这应该是你想要的