Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging Javascript on iPad

I was wondering if there are any useful tools people have found to debug javascript on an iPad which is not jail broken. It is an iPad supplied for work so jail breaking is not an option. Through some tedious steps I have gotten firebug-lite working on the iPad but my debugger statements in the javascript are not being hit. There is also no capability that I am seeing to set breakpoints as you can traditionally with Firebug.

I also have Safari's debug console open but that is fairly useless for what I am trying to accomplish.

Thanks for any ideas.

like image 866
Jeff Fol Avatar asked Sep 16 '11 19:09

Jeff Fol


People also ask

How do I enable debugging on my iPad?

Enabling debugging on your device On your device, open the Settings app and select the About phone menu. Locate your device's Build number and tap it seven times. If you are running an older version of Android, you can enable USB debugging by going directly to Settings > Developer options. Enter your device password.

How do I debug JavaScript on iPhone?

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 inspect JavaScript in Safari?

Open Safari's Preferences dialog by clicking the “Safari” menu item and selecting “Preferences…”. Inside the Preferences dialog, go to the Advanced tab and then check the “Show Develop menu in menu bar” option at the bottom.

Is there a debugger for JavaScript?

But fortunately, all modern browsers have a built-in JavaScript debugger. Built-in debuggers can be turned on and off, forcing errors to be reported to the user. With a debugger, you can also set breakpoints (places where code execution can be stopped), and examine variables while the code is executing.


2 Answers

Did you look at webkit remote debugging protocol? It seems they know people want a debugger for their iPad but still no real world native iPad remote debugger is available out there.

But don't get disappointed, there is a tool called weinre that doing what webkit folks willing to do in the future right now!

Update:

By release of Google Chrome for Android phones remote debugging and tablets debugging mobile web apps is no pain anymore. You will need an expensive Google Galaxy Nexus phone with ICS on it to do it. But future is bright! Check out the video demo here:

weinre is Web Inspector Remote. Pronounced like the word "winery". Or maybe like the word "weiner". Who knows, really.

like image 163
Mohsen Avatar answered Sep 29 '22 17:09

Mohsen


For those coming to this question from Google, there is now a Web Inspector available in iOS Safari (scroll down to "Safari on iOS").

like image 5
Kenny Grant Avatar answered Sep 29 '22 15:09

Kenny Grant