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

**URL:** <https://discourse.processing.org/t/my-enemy-script-error-line-0/19372>\
**Category:** p5.js\
**Created:** [April 3, 2020, 8:03pm UTC](https://discourse.processing.org/t/my-enemy-script-error-line-0/19372 "2020-04-03T20:03:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [April 4, 2020, 8:43pm UTC](https://discourse.processing.org/t/my-enemy-script-error-line-0/19372/2 "2020-04-04T20:43:41Z")

</div>

> [@Adelta\_21](#):
>
> Do you have the same problem?

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

> [@Adelta\_21](#):
>
> Is it due to some navigator settings?

I can’t say for sure either.

What I do know is that most JS online hosts run our code inside an [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe), which by itself gets a little in the way when we need to debug it.

But by itself an [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/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!

> [@Adelta\_21](#):
>
> Should I accept my fate?

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:

> [@Web editor -- offline?](https://discourse.processing.org/t/web-editor-offline/12399/7):
>
> Most of the time, I just use a simple text editor like Notepad2 to write JS code and host them online at [OpenProcessing.org](http://OpenProcessing.org) or as a GitHub gist: For more complex stuff, like writing TS or CS code, I use the Atom IDE and host them as a GitHub repo:

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

> [@Help! Why I cannot use the P5JS](https://discourse.processing.org/t/help-why-i-cannot-use-the-p5js/18067/2):
>
> For an absolute beginner, my advice is to start on some p5js online editor, such as this 1: man_student[OpenProcessing.org/sketch/create](http://OpenProcessing.org/sketch/create) Some sketches I’ve got there btW: grinning By using such specialized p5js online resources we don’t need to make our own “index.html” file. wink When you decide it’s time to learn how to code your own “index.html” file, you can use more generic JS online editors, such as these 2 below: sunglasses You can also take a look at my sketches I…

---

_[View the full topic](https://discourse.processing.org/t/my-enemy-script-error-line-0/19372)._
