问题
I have read lots of blogs about how to get firebug lite to work on the iPad and from what i can gather it worked at some point but hasn't worked in awhile. I can't get it to work myself.
So my question is has anyone gotten firebug lite or something simliar to work on the iPad recently. With the iPad being so popular I find it amazing that there isn't a good solid developer tool out there for it yet. Especially because in my experience it doesn't render web pages as expected quite often and needs specific tweaking.
Just to stop some quick replies, I already know its a webkit browser and the issues that I have spotted only show up on the iphone and ipad, not in chrome or desktop safari. So i really would love a solution that is native to the ipad itself.
回答1:
The suggestion below worked for me on an iPad3 running IOS6.
This technique is from http://www.jamesmacfie.com/2012/03/debug-your-html-css-on-the-ipadiphone/
Bookmark any site on iPad then edit the address. Paste in the following code:
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','https://getfirebug.com/','#startOpened');
回答2:
Try Remote Debugging with Chrome browser. However iOS 6 comes with built-in support for remote debugging - link.
回答3:
I've installed this many times (and in the past month on the new iPad) and it has worked.
http://martinkool.com/post/13629963755/firebug-on-ipad-and-iphone
FYI: The directions might be a little outdated so don't give up. What you will be doing is creating a bookmark. Then you edit the link in the bookmark with the script on Martin's website. That also means Firebug Lite can be used on Internet Explorer...although I couldn't edit any elements after getting it up and running.
Good luck!
来源:https://stackoverflow.com/questions/11639346/ipad-firebug-lite-or-similar