Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a Watch or Inspect in Xcode?

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.

like image 953
Java Ka Baby Avatar asked Aug 22 '11 07:08

Java Ka Baby


People also ask

How to use inspectors in Xcode?

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.

How do I add watch expressions in Visual Studio Code?

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.

How to view source code template in Xcode?

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.

How do I open a watch window in Visual Studio Code?

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.


1 Answers

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..."

enter image description here

like image 200
Suragch Avatar answered Nov 13 '22 14:11

Suragch