# How to run Processing code in Visual Studio?

**URL:** <https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009>\
**Category:** Processing\
**Created:** [October 22, 2021, 1:16pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009 "2021-10-22T13:16:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 22, 2021, 1:16pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/1 "2021-10-22T13:16:39Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0d2f6a729b4913f744b62955dd390a8577580c6c.png)  
i installed the processing extension to visual studio, but when i run it i get this message  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/18f69c1942046a1c59380cde7eb324a756bedbf1.png)  
when i then click on “find processing exstenstion” i get this  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/d4999f2dc291daf175581ee81b5918a91f727267.png)  
how do i fix this?

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [October 22, 2021, 8:15pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/2 "2021-10-22T20:15:02Z")

</div>

Hi,

Related thread:

> [@How to use Visual Studio Code with Processing 3](https://discourse.processing.org/t/how-to-use-visual-studio-code-with-processing-3/14458/14):
>
> That’s a shame. I got stuck in the Create Task File, on my Mac. After I proceeded to install “processing-java”, I installed the process-vscode extension, restarted vscode, created a \*pde file with basic processing code, but got the message: “No build task to run found. Configure build task” when running Create Task File command. If I click on it, it will prompt me to create some json file from template, but none seems to be adequate.

---

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 23, 2021, 9:24am UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/3 "2021-10-23T09:24:19Z")

</div>

hi Joseph how do i add [this](https://github.com/TobiahZ/processing-vscode) extension to vs?

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [October 23, 2021, 10:05am UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/4 "2021-10-23T10:05:51Z")

</div>

It’s on the README.md of the repository you provided:

> ## Installation Instructions
> 
> 1. Open [Visual Studio Code](https://code.visualstudio.com/)
> 2. Open the Command Pallet ( `CTRL+SHIFT+P` for Windows/Linux or `CMD+SHIFT+P` on Mac) enter the command “Install Extension”
> 3. Search for “Processing Language” and click on this extension.
> 4. Restart Visual Studio Code

---

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 23, 2021, 12:41pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/5 "2021-10-23T12:41:55Z")

</div>

i’ve done that, but it did not solve my problem. it still says i need a processing debugger

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/95e87e130390d7d4967ab2dbdfe8fd954239ef97.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1c24084137d3e6d276a8c11576f7ae073b7740e5.png)

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 23, 2021, 12:53pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/6 "2021-10-23T12:53:19Z")

</div>

Hello,

The link you provided states:

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/be5767b301fa25a68d34f2515219b6ecef97b86c.png)

Try to cancel it and see what happens.

`:)`

---

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 23, 2021, 1:30pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/7 "2021-10-23T13:30:31Z")

</div>

What do you mean by cancel it?

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [October 23, 2021, 1:53pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/8 "2021-10-23T13:53:45Z")

</div>

I guess they meant cancel to close the dialog box 🙂

I don’t have it installed now so I cannot test it - but how you execute a script is not through VS code debugger. Instead you should have an option to run a _task_ that says “run sketch”.

also in the screenshots, I noticed the file name is not valid. Like Processing IDE, you always need to match the folder name to the file name (projectname/projectname.pde). VS Code is a powerful tool (I use it for most of JS dev) but at the same time, it is very confusing, and sticking to Processing IDE is a good idea too. I would say VS Code is preferable when the code gets longer or if you have many tabs (that collapse in Processing IDE) - but for small projects, in my opinion, Processing IDE works fine too.

---

<div class="post-metadata">

**Author:** ![MoonAlien822](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Post date:** [October 24, 2021, 4:49pm UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/9 "2021-10-24T16:49:15Z")

</div>

How do I run the sketch? I can’t find this anywhere

---

<div class="post-metadata">

**Author:** ![philipplehmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philipplehmann/32/4111_2.png) [@philipplehmann](https://discourse.processing.org/u/philipplehmann)\
**Post date:** [October 25, 2021, 9:02am UTC](https://discourse.processing.org/t/how-to-run-processing-code-in-visual-studio/33009/10 "2021-10-25T09:02:10Z")

</div>

Hey there

To run Processing sketches from VS (on MacOS) I did the following:

- Open Processing and make sure processing-java is installed (Tools / install processing-java)
- Create a new sketch in Processing
- Open the sketch folder in VS-Code
- Install the [Processing Language - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde) Extension
- Create a task-file with Cmd + Shift + P, then find “Processing: Create Task File”
- Run the sketch with Cmd + Shift + B.

I remember doing it in a similar way on Windows.  
With “Ctrl + Shift + P” and “Ctrl + Shift + B” as keyboard shortcuts.

Tipp: I saved an example sketch with the created task file as a template. Usually I just duplicate that when creating a new sketch.
