Place a breakpoint on the appropriate line of code. When Xcode stops at this line, in the debug area (the bottom of the screen is divided into two parts, look at the right, if you do not see the bottom, shift + cmd + Y, plus sometimes the right side or the left side is hidden, and on the right bottom side there are small buttons to show them), you see all local and global variables. Right-click (or two fingers) the debug area, and you will see a context menu with one of the "add expression" options. Enter your expression.
Note: Above the previous user comment about the word βwatch,β itβs pretty clear who comes from any other development environment, but not in Xcode.
source share