Does Xcode have a watch window?

后端 未结 2 1378
臣服心动
臣服心动 2020-12-18 19:46

Does Xcode have a watch window for variables? It has a window for local variables but that\'s not much help when I want to watch the value of a global.

I\'ve been sp

相关标签:
2条回答
  • 2020-12-18 20:07

    Open Debug Area via View -> Debug Area -> Activate Console (Xcode 9)

    Right click -> Add Expression

    0 讨论(0)
  • 2020-12-18 20:12

    Solved! Right-clicking in the local variables window brings a menu option of "Add Expression". Type your variable name and now you are watching your variable/expression.

    The language of "expression" instead of the more familiar "variable" threw me quite a bit. Hard to search for a solution when I have the terminology wrong. Seems obvious now.

    0 讨论(0)
提交回复
热议问题