I'm using Pythonista, a mobile Python environment to code on my iPhone while I'm on the train with no laptop around. I've started working on a small web application using bottle and d3.js. However, finding javascript errors in Safari is impossible. There is simply no way to find out what error stopped the application.

Is there a workaround for this?


I found a way to do this. It's a little dirty but it works and it helps a lot with scripting for the browser.

Simply put a try...catch block around the code you're want to debug and use alert() to output the information to you. Like this:

try {
  // some code that might go wrong
catch (e) {
  • Not a programmer (so hammer away...) There are alternative browsers any of them (iCab, etc.) offer a debug mode? – Steve Chambers Apr 12 '18 at 14:15

You must log in to answer this question.

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