Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebug like debugging on Android

I have seen several posts that talk about remote debugging of javascript code on Android, but they all miss the point of what I am trying to do.

I have a Nexus 7 and I want to use it as a remote development environment when I am away from my desktop. I have created a chrooted debian distribution to run apache and php and git (via ssh). This chrooted environment mounts a subdirectory of the /sdcard directory from outside the chroot environement. Apache document root of a virtual host is pointing at a directory within this. Before leaving the desktop I can git push the latest release to the tablet. When I return git pull can get what I have done back again.

I then (when away from home and NOT connected to any network) can edit the code using an Android editor (using the 920 text editor), but then run the browser to look at what I have developed using localhost the apache virtual host picks this up and displays it.

The application I am developing IS NOT FOR ANDROID - it is ultimately for the desktop. But I want to be able to debug it like I was on the desktop. Breakpoints and single stepping are the prime thing, but also I tend to use the html section in firebug to adjust my CSS before editing it.

Is there a way to get either the chrome developer tools or firebug add on for firefox to load into a browser that will run in android?

like image 830
akc42 Avatar asked Apr 07 '13 10:04

akc42


1 Answers

I use Firebug lite bookmarklet for iPhone and iPad, never tried on Android, check this out http://martinkool.com/post/13629963755/firebug-on-ipad-and-iphone it must be similar on Android.

To activate it use this steps:

  1. Create a new bookmark or bookmark a page
  2. Rename the bookmark to “Firebug”
  3. Copy the textarea link:

    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?Fi+'NS':Fi;Er;Er;Er;(Fe[0]||Fe[0]).appendChild(E);E=new%20Image;Er;})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');

  4. Edit the Firebug bookmarklet, remove the URL and paste the bookmarklet
  5. Choose “Done” (on the virtual keyboard) and you’re all set
Hitting that bookmarklet should give you a fully functioning Firebug at the bottom of your mobile device.
like image 145
Irvin Dominin Avatar answered Sep 27 '22 19:09

Irvin Dominin