10

I want to quickly try some JavaScript code on an Android phone.

I cannot find how to open the console or something similar on either Chrome or the default browser. about:debug doesn't do anything, and I don't want "remote debugging".

I can download another app if necessary (but I don't want to root my device).

3

3 Answers 3

0

That feature seems to be unavailable for all major Android browsers.

You could try Opera Mini instead:

  1. Reset the console output by opening a new tab with the address debug:resetconsole

    Reset output

  2. Open a tab on the page on which you want to do the inspection:

    example.com

  3. Run JavaScript code on the page by replacing the address in the address bar with the following address javascript:var%20n%3Ddocument.firstChild%3Bwhile%28n%20%26%26%20n.nodeType%21%3DNode.ELEMENT_NODE%29%20n%3Dn.nextSibling%3Bconsole.log%28n.outerHTML%29%3B

  4. Retrieve the output by opening a new tab with the address debug:console

    Output

0
0

You can use Kiwi Browser. It is the only one that has debug mode built in, plus extension support on mobile.

0

If you are willing to root the device (Alternatively, you can try the non-root solution LSPatch) and install an Xposed Framework, then you can use my Xposed module ChromeXt. It supports showing the console with Eruda Console and with DevTools. See screenshots of both of them respectively:

Eruda Console using ChromeXt DevTools using ChromeXt

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .