Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Javascript running in a webview on an iPad?

Tags:

I have an iPad running some Javascript in a webview, but sometimes it just refuses to work. Does anyone have a way to debug this kind of issue?

like image 507
Jason Avatar asked Mar 17 '11 06:03

Jason


People also ask

How do I debug JavaScript on iPad?

To debug JavaScript on the iPad, you need to open the Safari browser. Use a USB cable to connect the iPad to Mac. Safari opens and your iPad now visible in the DEVELOP Menu. After selecting, start debugging JavaScript.

How do I debug JavaScript in Wkwebview?

open the website or html page in your webview, then open safari. click develop, then go to simulator and you will find your website title there. once you open it you will see the javascript debugger, console and everything else you can dream of.


2 Answers

You can use bookmarklets to run things like firebug lite: Check the following article for links to how to make bookmarklets installable on mobile safari as well as links to firebug lite. http://community.godaddy.com/library/setting-up-a-debugging-environment-on-the-ipad/

like image 186
Kelly Anderson Avatar answered Sep 29 '22 09:09

Kelly Anderson


Recently with the new iOS 6 you can turn on remote debugging and analyze your project with Webkit Inspector on Safari (but only with a Mac, because you must have safari 6.x).

This method would not work on the first generation of iPad too, because they're not upgradeable to iOS 6.

The question is one year old and obviously it wasn't available at the moment. I'm posting it so that someone who come up here could know it.

Info: http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers

like image 20
franzlorenzon Avatar answered Sep 29 '22 10:09

franzlorenzon