9

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?

4
  • I use a firebug lite bookmarklet for iPhone and iPad, never tried on Android, check this out osxdaily.com/2011/12/02/run-firebug-on-ipad-or-iphone it must be similar on android; if ok I post this comment as answer Commented Apr 7, 2013 at 11:17
  • 1
    I think Firebug lite has to be the solution. Commented Apr 8, 2013 at 20:41
  • I'll post it at answer, thanks. Commented Apr 8, 2013 at 22:13
  • @akc42 WRONG. Firebug Lite cannot set breakpoints or singlestep, and therefore is incapable of doing serious debugging. Commented Dec 17, 2013 at 17:57

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

4 Comments

I did get it to work on Safari/iPad, but not on any Android browser.
Firebug Lite is useless to me, as it cannot set breakpoints or single step.
@Michael the question is about firebug like, and it works fine...if you need more check stackoverflow.com/questions/2314886/…
To get this to run on Chrome for Android you'll need to follow the procedure given by Amit Agarwal. Essentially you need to start typing the name of the saved Bookmarklet in the address bar and then tap the auto-suggestion rather than select the Bookmarklet from the bookmarks menu.
0

At least not for Firefox Mobile, because all the devtools are still partially based on XUL, where the Firefox Mobile is using Native UI.

I don't think there is any plan in the close future to change this situation; it's not a common scenario.

However, you should be able to do something using the Debugger API, creating an add-on for Firefox Mobile. But I don't know if it's worthy.

2 Comments

I would also need Firebug for Android browsers, but not for the reasons expressed by the OP. I need it to debug a Css/Dom issue which on desktop browsers works fine but on mobile browsers does not work. For example if you access this webpage on Android and zoom-in a lot you will see broken images, but on desktop there are no broken images: ec.europa.eu/programmes/erasmus-plus/projects_en#search/project/…
You should be able now to use devtools from Firefox Desktop to debug Firefox for Android. Here some details: developer.mozilla.org/en-US/docs/Tools/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.