1

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?

1 Answer 1

1

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) {
  alert(e);
  alert(e.stack);
}
1
  • Not a programmer (so hammer away...) There are alternative browsers any of them (iCab, etc.) offer a debug mode? Commented Apr 12, 2018 at 14:15

You must log in to answer this question.

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