JJJ
JJJ

Reputation: 2909

Does xCode have a debugging console for iOS development like a browser's console?

I would like to easily check property values by typing them into the console (how it works in browser's console). It seems to not be possible. What are the alternatives for easy debugging of different property values instead of breakpoints?

Upvotes: 0

Views: 370

Answers (4)

Ketan Parmar
Ketan Parmar

Reputation: 27448

You have to use breakpoints. there is no other options. breakpoints is something like debugger so put break point wherever you need and then when you reach at that breakpoint application will pause and If you simply take mouse curser over that line then also you can know the value of different properties.

you can use po command to print value of any property. write in console(beside lldb), po then space and than property or variable name and you will get value of it.

You can use step over to go to next line and can use continue execution to continue through all breakpoints.

You can refer this tutorial. It is for old xcode but conceptually same with current.

Hope this will help :)

Upvotes: 1

Aneesh
Aneesh

Reputation: 107

In the console you can see the property values using po propertyName. For view debugging, xcode provides view debugger as this image

Upvotes: 1

Joride
Joride

Reputation: 3763

No. Closest thing is the console where you can look at variables and there is an option to look at an exploded view of you UI, where the classes and properties can be inspected. This is activated when you are running your app and click on the button with a hover-text "Debug View Hiererachy". You can find this button just above the console, to the left of the location icon.

enter image description here

Upvotes: 0

Mawoon
Mawoon

Reputation: 1045

Type 'po propertyname' into the console and click enter.

Upvotes: 1

Related Questions