How to get Firebug on the iPad and iPhone

/ Published in: JavaScript
Save to your folder(s)

Web developers targetting HTML5 on iDevices would really benefit from having Web Developer Tools or Firebug on Mobile Safari. Enter Firebug Lite! However, iPads, iPhones and bookmarklets don’t go well together, so I put together this little howto.

1. Surf to this page on your iPad or iPhone and bookmark it
2. Rename the bookmark to “Firebug”. As you can see, the URL is uneditable right now
3. Select and copy the javascript snippet
4. Edit the Firebug bookmarklet, remove the URL and paste the bookmarklet
5. Choose “Done” (on the virtual keyboard) and you’re all set
6. Firebug on your iPad or iPhone

Copy this code and paste it in your HTML
  1. javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?F[i+'NS'](E,'script'):F[i]('script');E[r]('id',b);E[r]('src',I+g+T);E[r](b,u);(F[e]('head')[0]||F[e]('body')[0]).appendChild(E);E=new%20Image;E[r]('src',I+L);})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','','#startOpened');


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.