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

前端 未结 6 979
滥情空心
滥情空心 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:37

    As fas as i understand you would like to see when a variable is changing. For this make a breakpoint and right click on it and choose Edit Breakpoint. A window will appear:

    enter image description here

    Make sure you choose the right action like Debugger Command or Log Message and check the tick down at the options Automatically continue after evaluating. So you get some kind of action (e.g. logging, sound, etc) and wont stop at the breakpoint.

提交回复
热议问题