2 Replies Latest reply on Sep 16, 2018 3:31 AM by nsharony

    How to debug JavaScript errors when running a Cordova App on Android TV

    nsharony

      I have written a Javascript script which I bundled into an Android app using Cordova. The code is written in ES6 and is transpiled into ES5 using Babel and Webpack.

      The app is intended to run on a simple TV, so I am using MK809 Android dongle to transform a TV into an Android-based TV. Then I install the new app and try to run it.

      The problem is that the app terminates immediately (most probably due to some ES5 errors as the transpilation is probaby not complete or correct).

      Is there a way this can be debugged? When I run it on my computer's Chome, everything works perfectly as it has full ES6 support. The app also runs perfectly on my Android phone as it uses a modern browser which supports ES6.
      How can I get access to any JavaScript errors when the app runs? When I run it on the browser, I see them in the developer console.

      I am not a FE guy, so my knowledge is a bit limited. Can anyone suggest the best way to debug this? How can I run a local copy of a brower with ES6 disabled so that I could easily spot the problem?

      Thank you