Remote console.log() on iOS devices

2019-02-04 15:30发布

问题:

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!

回答1:

  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 > inspectable applications, your running app should be in there.

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

hope that helps.



回答2:

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



回答3:

One File Remote Console.log for node.js

Solution: Server side console log.



回答4:

You can use a remote javascript console. There a few available.

  • weinre
  • spotneedle
  • jsconsole


回答5:

In iOS6, you can now use the Remote Web Inspector on OSX to connector to the iPhone via USB. See the Apple documentation for more information.



回答6:

mobile-console-log is also a utility for debugging directly from your mobile into Chrome Devtools