iOS 设备上的远程 console.log()
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4478271/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remote console.log() on iOS devices
提问by felixlaumon
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.
我正在开发一个涉及 touchEvent 的网络应用程序。如果我可以在我的 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.
我可以让 iOS 设备上的 Mobile Safari 将控制台日志存储在系统中的某个位置吗?我已经越狱了我的 iPad。
Thanks!
谢谢!
回答by jared
- plug iphone into computer
- settings > safari > advanced > web inspector (turn on)
- open safari on your computer
- run your web app on your iphone in the safari browser
- on your computer in safari, go to develop > inspectable applications, your running app should be in there.
- 将iphone插入电脑
- 设置 > safari > 高级 > 网络检查器(打开)
- 在您的计算机上打开 safari
- 在 safari 浏览器中的 iphone 上运行您的网络应用程序
- 在 safari 中的计算机上,转到开发 > 可检查应用程序,您正在运行的应用程序应该在那里。
doing these steps enables the safari debug tools on your desktop to reflect and respond to the connected iphone.
执行这些步骤可使桌面上的 safari 调试工具反映并响应连接的 iphone。
hope that helps.
希望帮助。
回答by felixlaumon
回答by phatmann
Just turn on the debugging console in Mobile Safari. This is enabled in Settings/Safari/Developer.
只需在 Mobile Safari 中打开调试控制台。这是在 Settings/Safari/Developer 中启用的。
回答by phatmann
回答by Case
In iOS6, you can now use the Remote Web Inspector on OSX to connector to the iPhone via USB. See the Apple documentationfor more information.
在 iOS6 中,您现在可以使用 OSX 上的 Remote Web Inspector 通过 USB 连接到 iPhone。有关更多信息,请参阅Apple 文档。
回答by jlguenego
mobile-console-logis also a utility for debugging directly from your mobile into Chrome Devtools
mobile-console-log也是一个实用程序,用于直接从您的手机调试到 Chrome Devtools