as in the title is there a way in Xcode to Add Watch or Inspect a code segment in Xcode
for example how can I see the result of [myObject aMethod] with actually stepping over or Stepping in.
Xcode Inspectors is a window where you can edit the selected UI component’s properties such as title, background color, alignment, etc. You can use it after you select a UI component from Xcode Library and drag & drop the UI component to the Xcode Main.storyboard file.
When your application enters break mode, the watch expressions you selected appear in the Watch window where you can observe their values. On the Debug menu, choose Add Watch. The Add Watch dialog box is displayed. If an expression is already selected in the Code window, it is automatically displayed in the Expression box.
When you select Xcode project’s Main.storyboard file, the Library window shows the above UI components, when you select ViewController.swift file, the Xcode Library window shows source code template like below. 2. Xcode Assistant Editor.
Open a Watch window by selecting Debug > Windows > Watch > Watch 1, or pressing Ctrl + Alt + W > 1. You can open additional Watch windows by selecting windows 2, 3, or 4. In the Watch window, select an empty row, and type variable a. Do the same for b and c.
To actually see the value change while you step through, you can right click the watch list of the debug area and choose "Add Expression..."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With