最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Firebug like debugging on Android - Stack Overflow

programmeradmin0浏览0评论

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?

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?

Share Improve this question asked Apr 7, 2013 at 10:26 akc42akc42 5,0015 gold badges46 silver badges66 bronze badges 4
  • I use a firebug lite bookmarklet for iPhone and iPad, never tried on Android, check this out osxdaily./2011/12/02/run-firebug-on-ipad-or-iphone it must be similar on android; if ok I post this ment as answer – Irvin Dominin Commented Apr 7, 2013 at 11:17
  • 1 I think Firebug lite has to be the solution. – akc42 Commented Apr 8, 2013 at 20:41
  • I'll post it at answer, thanks. – Irvin Dominin Commented Apr 8, 2013 at 22:13
  • @akc42 WRONG. Firebug Lite cannot set breakpoints or singlestep, and therefore is incapable of doing serious debugging. – Michael Commented Dec 17, 2013 at 17:57
Add a ment  | 

2 Answers 2

Reset to default 3

I use Firebug lite bookmarklet for iPhone and iPad, never tried on Android, check this out http://martinkool./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./','#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.

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 mon 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.

发布评论

评论列表(0)

  1. 暂无评论