Is there debugging of Firebug or JavaScript for Android?

I am developing a website for mobile devices. It runs on the Firefox desktop. It works on the iPhone, but when I press the bud on Android 2.x (and possibly below). my javascript code crashes or what else ...

Can I access the registration console or JavaScript for these devices?

Better should be some kind of Firebug app.

+62
javascript android html5 mobile android-browser
May 12 '11 at 16:32
source share
15 answers

One parameter weinre . It provides DOM and Style editing along with the console. If you do not want to configure it yourself, there is an instance located at http://debug.phonegap.com

Another option is JSHybugger . This is by far the most complete debugging environment available for the Android browser. This is a paid product, but probably worth it.

+44
May 13 '11 at
source share

Chrome has a very nice feature called "USB Web debugging", which allows you to see the debug console of mobile devices on your PC when connected via USB.

See here for more details.

EDIT: It seems that ADB is not supported on Windows 8, but this link seems to provide a solution:

http://mikemurko.com/general/chrome-remote-debugging-nexus-7-on-windows-8/

+34
May 30 '12 at 12:48
source share

You can type about:debug in some mobile browsers to pull up the JavaScript console.

+12
Apr 23 2018-12-21T00:
source share

I sometimes print debug output to a browser window. Using jQuery , you can send output messages to the display area on your page:

 <div id='display'></div> $('#display').text('array length: ' + myArray.length); 

Or if you want to view JavaScript variables without adding a display area to your page:

 function debug(txt) { $('body').append("<div style='width:300px;background:orange;padding:3px;font-size:13px'>" + txt + "</div>"); } 
+7
Oct 29 '12 at 8:24
source share

I had the same problem , just use console.log(...) (e.g. firebug) and install the log viewer application, this will allow you to view all the logs for your browser.

+3
May 30 '11 at 15:34
source share

We perform the following steps in our project to debug the website on mobile devices.

  • Install mobogenie software on your mobile and desktop (both have the same version).
  • Open your site in the Google Chrome mobile browser.
  • Open Google Chrome on the desktop. Go to the "Advanced Settings" → "Test Device" section.
  • Here you will find a list of sites open on your mobile phone, and click "Check", and you will get the JavaScript console you need.
+2
Feb 05 '15 at 6:55
source share

USB USB debugging is one option

"screen printing" is different.

But I prefer remote debugging through adobe edge inspect ', officially known as adobe shadow . It uses weinre internally (= WEB INspect REmote)

You just install it + a small plug-in in your browser (Chrome) and a free application that you can download in the game store. Then you have all the tools, such as the Chrome development tools.

It also supports iOS and Kindle Fire.

Update

As Chris pointed out, you have to pay a subscription to use border checking. A cheap alternative is to use weinre directly, it is a base for regional inspection. Here's an article on how to set it up.

+1
Oct 29
source share

If you use Cordova 3.3 or higher , and your device is running Android 4.4 or higher , you can use "Remote debugging on Android with Chrome." Full instructions:

https://developer.chrome.com/devtools/docs/remote-debugging

In short:

  • Connect your device to a computer using a USB cable
  • Enable USB debugging on your device (on my device, go to "Settings"> "Advanced"> "Developer Options"> "USB Debugging").

Or , if you use Cordova 3.3+ and do not have a physical device with 4.4, you can use the emulator, which uses Android 4.4+ to run the application through the emulator, on your desktop computer.

  • Launch the Cordoba app on your device or emulator
  • In Chrome on your desktop computer, type chrome: // check / # devices in the address bar
  • Your device / emulator will be displayed along with any other recognizable devices that are connected to your computer, and under your device you will see the details of Cordova's “WebView” (basically your Cordoba application) that works on the device / emulator (the way that Cordoba works, it basically creates a browser window on your device / emulator, within which there is a "WebView", which is your running HTML / JavaScript application).
  • Click the "verify" link in the "Web Browsing" section, where your device / emulator is displayed. This brings up the Chrome developer tools, which now allow you to debug your application.
  • Select the Sources tab of the Chrome Developer Tools to view the JavaScript on which the Cordova application is currently running on the device / emulator. You can add breakpoints in JavaScript that allow you to debug your code.
  • In addition, you can use the "console" tab to view any errors (which will be shown in red) or you will see a '>' prompt at the bottom of the console. Here you can enter any variables or objects (for example, DOM objects) that you want to check the current value, and the value will be displayed.
+1
Sep 23 '15 at 7:24
source share

You can try the YConsole built-in js console. It is lightweight and easy to use.

  • Breaking logs and errors.
  • Object Editor.

How to use:

 <script type="text/javascript" src="js/YConsole-compiled.js"></script> <script type="text/javascript" >YConsole.show();</script> 
+1
04 Oct '15 at 8:28
source share

I installed the firefox console add-on ( https://addons.mozilla.org/en-US/android/addon/console/ ) in my firefox browser on Android and it worked pretty well. It helped me debug my angular2 application.

+1
Aug 02 '16 at 2:41
source share

I also looked for a simple console replacement, just to flush text. So, I made this function:

 function remoteLog (arg) { var file = '/files/remoteLog.php'; $.post(file, {text: arg}); } 

The remote PHP file writes all the output to the database in arg . It took me 5 minutes (well, on the server side, I used a simple registration library that records and displays text messages, but still ...).

0
Aug 07 '12 at 8:18
source share

If you don't mind sending over a third-party server, JSConsole is a pretty useful remote debugger for JavaScript.

0
Nov 20 '12 at 19:52
source share

In 2013-12-03, Google launched Chrome DevTools for mobile devices , which allows developers to remotely debug mobile web applications through emulation and screen shielding with a zero configuration .

For all features, check Paul Irish speaks on YouTube .

0
Dec 03 '13 at 20:28
source share

I recently wrote a tool to display console logs in a movable / resizable "window" (actually a div). It provides similar functionality to the Firebug console, but you can see it on your page on the tablet. Tablet / Smartphone / Phablet Debugging Console

0
Aug 19 '14 at 12:58 on
source share

Try js-mobile-console

MobileConsole can be embedded into any page for debugging. It will catch errors and behave exactly like the native JavaScript console in the browser. It also displays all the logs you wrote through the .console window API.

0
Nov 07 '14 at 0:35
source share



All Articles