4 ms·
Sometimes dumping data to a pre tag is the simplest thing, especially on mobile. I did it just yesterday :) Be careful about using JSON.stringify on objects as
by allannienhuis 7y ago
Sometimes dumping data to a pre tag is the simplest thing, especially on mobile. I did it just yesterday :)
Be careful about using JSON.stringify on objects as a debugging technique though, because you may not be able to see properties on the prototype chain ('inherited' properties), and some objects customize their serialization to JSON (supply a custom toJSON method) which in some cases can be misleading. Things like that have contributed to a number of my grey hairs. Yes, I'm talking about you, Geolocation Coordinates! :)
Chrome has really nice support for remote debugging on Android.
If you can't get physical access to the device to configure them for remote debugging, there are some other nice remote debugging tools. One example: https://jsconsole.com/remote-debugging.html https://jsconsole.com/remote-debugging.html