How do you watch or evaluate an expression in xcode like visual studio's immediate window?

前端 未结 6 910
滥情空心
滥情空心 2021-02-05 06:08

In MS visual studio we just right click add watch.

How does one do this in Xcode?

6条回答
  •  庸人自扰
    2021-02-05 06:42

    Set some breakpoints in the begginning of the looping and functions. Once u click on the breakpoint(one similar to arrow) button in the editor window the "Build and debug tool" will get enabled. You can then go to the debugger by clicking the debugger icon. on the right of the debugger window variables will be visible select self->then the instance variable u r going to set watch point.Right click on that and select "watch variable".A trigger point will be set and you will be notified with the value of the variable when changed.

提交回复
热议问题