Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote console.log() on iOS devices

I am developing a web app that involves touchEvent. It will be much more easier to debug those if I can view the console remotely on my Mac.

Can I make my Mobile Safari on the iOS device store the console log somewhere in the system. I have already jailbreak my iPad.

Thanks!

like image 665
felixlaumon Avatar asked Dec 18 '10 13:12

felixlaumon


People also ask

How do I find the console log in iOS?

Connect your iOS to your computer with a USB or Lightning cable. Go to Window > Devices and select your device from the list. Click the "up" triangle at the bottom left of the right hand panel. All logs from all apps on the device will be displayed here.

How do I view console log in iOS Safari?

Open the iPhone Settings menu. On an iPhone with an early version of iOS, access the Debug Console through Settings > Safari > Developer > Debug Console. When Safari on the iPhone detects CSS, HTML, and JavaScript errors, details of each display in the debugger.

How do I check the console log on my phone?

Click the Inspect option under the tab you want to view the web console for. A new window will open. You can interact with the Chrome browser on your Android phone via the left panel in this window or you can interact with it on your device so long as you do not disconnect it from your computer.

How do I open the console in Chrome iOS?

In Chrome on your iPad or iPhone, go to chrome://inspect and then press Start Logging. Now go do your thing in another tab, keeping this tab open. Come back anytime to see any and all console outputs!


2 Answers

  1. plug iphone into computer
  2. settings > safari > advanced > web inspector (turn on)
  3. open safari on your computer
  4. run your web app on your iphone in the safari browser
  5. on your computer in safari, go to Develop -> "name of your iphone" and then find the correct tab under "Safari" opens Web Inspector.

doing these steps enables the safari debug tools on your desktop to reflect and respond to the connected iphone.

hope that helps.

like image 55
jared Avatar answered Sep 21 '22 05:09

jared


Just turn on the debugging console in Mobile Safari. This is enabled in Settings/Safari/Developer.

like image 42
phatmann Avatar answered Sep 21 '22 05:09

phatmann