X
Tap here to go to the mobile version of the site.

Support Forum

Is there any way to debug Javascript on Firefox Preview?

Posted

I'm redesigning an existing website. I have some Javascript which runs behind the search facility to make AJAX calls which populate an autocomplete. This works on every modern browser I've tested it in, but for some reason I can't make it work in Firefox Preview on my Android device. It *does* work with the original Firefox on that device.

Is there any way to get a Javascript console with this as I would with my desktop Firefox? Or is there a version I can run on my desktop which works (or more importantly, doesn't) on my Linux desktop?

I'm redesigning an existing website. I have some Javascript which runs behind the search facility to make AJAX calls which populate an autocomplete. This works on every modern browser I've tested it in, but for some reason I can't make it work in Firefox Preview on my Android device. It *does* work with the original Firefox on that device. Is there any way to get a Javascript console with this as I would with my desktop Firefox? Or is there a version I can run on my desktop which works (or more importantly, doesn't) on my Linux desktop?

Chosen solution

Thanks Ballison,

Unfortunately logcat output doesn't seem to show any Javascript-related output (ie, like the console on the desktop), so trying to debug with console.log() doesn't give any info.

However, for some reason the function that wasn't working "is" now working. Evidently as I've been working on my Javascript I've inadvertently solved the problem. Thinking about it, it may have been one of the changes I had to make to get the site working on IE9.

Read this answer in context 0
Quote

Additional System Details

Application

  • User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

More Information

Ballison
  • Administrator
14 solutions 90 answers

Hi foxfire4,

Have you tried connecting your android device via USB and using Remote Debugging? This should enable you to use the debugger on your desktop with the browser on your device.

If you need any help getting this set up or if you have tried this and ran into issues, please let me know!

Hi foxfire4, Have you tried connecting your android device via USB and using Remote Debugging? This should enable you to use the debugger on your desktop with the browser on your device. If you need any help getting this set up or if you have tried this and ran into issues, please let me know!
Was this helpful to you?
Quote

Chosen Solution

Thanks Ballison,

Unfortunately logcat output doesn't seem to show any Javascript-related output (ie, like the console on the desktop), so trying to debug with console.log() doesn't give any info.

However, for some reason the function that wasn't working "is" now working. Evidently as I've been working on my Javascript I've inadvertently solved the problem. Thinking about it, it may have been one of the changes I had to make to get the site working on IE9.

Thanks Ballison, Unfortunately logcat output doesn't seem to show any Javascript-related output (ie, like the console on the desktop), so trying to debug with console.log() doesn't give any info. However, for some reason the function that wasn't working "is" now working. Evidently as I've been working on my Javascript I've inadvertently solved the problem. Thinking about it, it may have been one of the changes I had to make to get the site working on IE9.
Was this helpful to you?
Quote
Ballison
  • Administrator
14 solutions 90 answers

Hi foxfire4,

I'm sorry my solution didn't work for you, but I'm glad to hear you managed to resolve it!

Hi foxfire4, I'm sorry my solution didn't work for you, but I'm glad to hear you managed to resolve it!
Was this helpful to you?
Quote
kbrosnan
  • Moderator
587 solutions 3861 answers

You can use a USB connection and desktop Firefox to inspect pages on Firefox for Android or Preview. It is not possible to see javascript errors on adb logcat as it is a global resource that could leak user websites visits to any app.

https://developer.mozilla.org/en-US/docs/Tools/about:debugging

You can use a USB connection and desktop Firefox to inspect pages on Firefox for Android or Preview. It is not possible to see javascript errors on adb logcat as it is a global resource that could leak user websites visits to any app. https://developer.mozilla.org/en-US/docs/Tools/about:debugging
Was this helpful to you?
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.