Faustino Gagneten
Faustino Gagneten

Reputation: 2774

iOS Monitor like Android Monitor for debugging?

I'm new with iOS development. What I'm working out is how to get information about my app when I run it in iPhone.

For example: When I develop in Android, I connect my phone (with depuration mode) and open Android Monitor. So I can see if something went wrong an the monitor show me: lines 425 nullPointerException ....

What's the problem? I built my hybrid app with HTML and Ionic in a Windows PC so I'm using Ionic View to show my app in my friend's iPhone. Then I downloaded xCode in my friend's Mac and I'm trying to know whats wrong with my app because it show me a white screen.

So... May be, I can reach my app error if I could do something like a I described with my Android Monitor and find the error.

Thanks for helping!

Upvotes: 2

Views: 2262

Answers (1)

Fahim
Fahim

Reputation: 3556

There are several places to see errors and log output depending on what you are doing. If you are running your app via Xcode, then you can see the console output in the debug view - use the following button on the toolbar to open the debug view:

enter image description here

The debug view will appear at the bottom of the Xcode window and it can have two panes - a variable view, and the console output. The console output area will show ouptut from your app as it runs in Xcode. You can open/close the two panes by using the two buttons you will see the bottom right when the debug view is showing.

If you are not running your app via Xcode, then you can connect your device to your Mac via USB cable, and then in Xcode select Window - Devices from the Xcode menu. The new window you get will allow you to connect to your device and see the crash logs on the device. If your app is crashing, this should allow you to see the crash logs from your app.

Alternatively, you can see the console output (similar to Monitor on iOS) by running the Console app on your Mac while your iOS device is connected to the Mac. On the Console app sidebar, you should see your iOS device. If you select the device, you can see the console on the device, like this:

enter image description here

The above might show you what is happening in your app as it runs.

Hopefully, this helps :)

Upvotes: 6

Related Questions