My enemy "Script error. (:line 0)"

B/c I don’t use the p5js online editor I don’t!

I can’t say for sure either.

What I do know is that most JS online hosts run our code inside an <iframe>, which by itself gets a little in the way when we need to debug it.

But by itself an <iframe> shouldn’t interfere that much.

It would only make it harder to directly access global variables and that’s it.

My guess is that the p5js online editor goes further than that, w/ “features” like console logs redirection, “friendly” custom error messages and so on; which end up interfering w/ normal console debugging!

Having so many other options available in the JS world, I fail to understand why you would feel like so!

For most cases, where my sketches are small, I just use a simple text editor like Notepad2; and Atom for bigger 1s:

Once I’ve got them running properly I pick some JS host site:

2 Likes