PyCharm的Debug工具栏中的Watches

时间:2022-10-30 08:57:18

In the Watches pane you can evaluate any number of variables or expressions in the context of the current stack frame. The values are updated with each step through the application, and become visible every time the application is suspended.

The Watches pane shows multiple expressions that persist from one debug session to another, until you remove them.

Watch expressions are always evaluated in the context of a stack frame that is currently inspected in the Framespane. If an expression cannot be evaluated, it is displayed with a question mark.

 

你能在Watches面板中查看到当前缓存结构中的任何变量和表达式的值。应用执行每一步,这些值都将随之变化,但当应用遇到断电中断时,这些变量就可以看到了。

Watches面板上展示的多个表达式也会出现在其他的session中,除非你手动删除它们。Watch能显示出来的表达式或者变量的值,都是能够检测出来的表达式或者变量。如果一个表达式没有报出值,那么它应该是被标记为问题表达式了。