P5.js extension for Visual Code Studio error

Hi @asymmetric,

What do you mean by …


P5js is javascript so you can edit your sketch with any editor and you can even easily run it locally with any common webbrowser?
Or you can use processing PDE, install p5js mode and use that.

Regarding your first post I would recommend to re-install the VSCode with newest version and try to install p5.vscode afterwards (had also such issues in the past which was solved that way)

— mnse


Thank you @mnse, I am currently using processing 3 for java, but I would like to use javascript as well. Where do I download processing PDE? I tried downloading from the p5.js website but recieved an error message.

I have several books on processing java and p5.js javascript and I am now realizing the difference between the compilers. Is that correct? I can’t code javascript into my processing 3 desktop correct?

Thank you, I will try to re-install VSCode and then proceed to the p5.vscode extension download!

Cheers to you for always helping me!

I appreciate your help.


This is what my processing compiler looks like at the moment. And here is a list of books that I am studying at the moment:

  • Processing, second edition: A Programming Handbook for Visual Designers and Artists (The MIT Press) second edition
  • The Nature of Code: Simulating Natural Systems with Processing
  • Generative Design: Visualize, Program, and Create with Processing

Since beginning of 2022 p5js mode has switch to processing 4 (PDE)

So you need to download and install it.
Afterwards you can install the p5js mode via contribution manager on tab modes from inside the PDE.

— mnse

1 Like

Oh, I see now! I’m just running older versions of processing and VSCode!

I just downloaded the newest version of VSCode and it fixed the error that I was running into!

With that being said, do I need both proceessing 4 (PDE) and VSCode?

No! One is enough … :slight_smile:
But for processing java I personally would recommend to upgrade to processing 4 (PDE) :wink:

— mnse

PS: didn’t know one can mark it’s own answer as solution !? :grinning:

1 Like
  • P4 has been a headache since the beginning!
  • This forum is full of topics about folks having problems w/ P4!
  • P4 is still in beta and there’s no date for it to become “stable”!
1 Like

Yeah! But I believe that it will be the future and almost works well. :slight_smile:

1 Like

I just downloaded processing 4 (PDE) and ran into the following error message.

Should I just stick to VSCode with p5.js extentions?

Yes! For p5js VSCode is very handy.

Do you know why I am getting this error for processing 4?

Sorry! Missed that you are using mac … Forget Processing 4 for now…

— mnse

Okay, ill stick to processing 3.5.4, p5.js browser, and VSCode for now!

Processing 4 (PDE) only works on Windows? I selected the Mac download.

You are so helpful!!! Thank you!

Usually it should also run on mac, but reality tells another story… :slight_smile:

On Windows it works quite well, depending on my own experience with it!

I need a new computer huh? lol! I’m working on it! Thank you for your help again :smiley:

  • When that future comes I’ll be installing P4 too.
  • But for now we should learn from the past.
  • All Processing major versions had problems even months after a stable release!

I can’t help you b/c P4 won’t touch my computer until it’s proven stable.


What are your favorite compilers for java and javascript? Do you prefer VSCode and the browser?

I use both Java & Python modes on the Processing’s IDE (PDE).

For online sketches, I use any text editor for simple 1s and VSC for complex 1s.

Then I publish them online on sites like OpenProcessing.org, Glitch.com or GitHub.com, etc. depending on the complexity.

The “secret” for online sketches is to know how to create an “index.html” for it:


1 Like

Wow, thank you for all of the new resources on how to see more code examples as well as how to share code! I’m going to check out these links that you provided further in a moment!

I have another question, can you code javascript pj.5s in the Python mode on Processing 3.5.4, or are you referring to Processing 4 (PDE)?

If you wanna code the p5js flavor using Python syntax take a look at pyp5js:

However it requires we install Python in order to compile the sketch into JS.

Or have a look at the sketch I did in PyScript:

1 Like