This is a Visual Studio Code extension created by Tobiah Zarlez to add Processing language support.
This extension does not allow you to debug Java or Processing projects.
Possibly! Let us know, we'd love to hear your suggestions.
- Open Visual Studio Code
- Open the Command Pallet (
CTRL+SHIFT+P
for Windows/Linux orCMD+SHIFT+P
on Mac) enter the command “Install Extension” - Search for “Processing Language” and click on this extension.
- Restart Visual Studio Code
Open any .pde file, or simply choose "Processing" from the drop down menu in the bottom right corner.
Once the language has been set, you will see code snippets pop up automatically as you type!
Adds a .vscode/tasks.json
file to your project folder, that has the contents of the ProcessingTasks.json
located in the root folder of this project.
When you run this task (Keyboard shortcut: Ctrl+Shift+B
), it will compile and run your project!
If you would like to see output from the compiler, simply comment out the line "showOutput": "never",
NOTE: Processing must be added to your path, or you must set the "processing.path" setting!
Follow these instructions to add Processing to your path, or these alternate instructions instead to modify the path setting.
See "Requirements" for full details.
This is just a shortcut for running the .vscode/tasks.json
file. Same as pressing Ctrl+Shift+B
Note: Must have ran the "Create Processing Task File" command first, see above!
Opens this documentation.
Use the pallet command "Processing: Open Documentation for Selection" to open the processing documentation for the current selection.
Use the pallet command "Processing: Search Processing Website" to quickly search whatever you want on the processing website.
Installing the extension will give you instant access to syntax highlighting and snippets.
However, in order to compile and run your processing project from Visual Studio Code, you will need to do three things:
- Set up your
.vscode/tasks.json
file. (See: "Command: Create Task File") - Add Processing to your path OR Modify your
.vscode/tasks.json
file. (See: "Add Processing to path" or "alternate method") - Have a
<File>.pde
whose filename matches the name of the project's folder (General Processing Requirement). Your file cannot contain any spaces or it will not run correctly.
In order to automatically compile and open from Visual Studio Code, I recommend adding Processing to your path.
That means you should be able to type the processing
from anywhere on your machine, and it will open Processing.
It's easier than you might think!
- Open the "Advanced System Settings" by running sysdm.cpl
- In the "System Properties" window, click on the Advanced tab.
- In the "Advanced" section, click the Environment Variables button.
- Edit the "Path" variable. Append the processing path (Example:
;C:\Program Files\Processing-3.0.1\
) to the variable value. Each entry is separated with a semicolon.
Open Processing, and click the Tools
-> Install "processing-java"
menu item.
Note: You will have to install processing-java for all users for this to work
Set your PATH
to where your processing application is located.
Example: export PATH=$PATH:/opt/processing/processing-2.0b4
You also need to create an alias for processing-java
in /bin/
instead of /usr/bin/
.
Example: sudo ln -s /opt/processing/processing-java /bin/processing-java
Once you've installed Processing to your path, you just need to add the appropriate .vscode/tasks.json
file to every Processing project.
See the command "Create Task File"
What if you cannot, or do not want to add Processing to your path?
Simply modify the processing.path
setting to follow the path to wherever processing is installed on your machine. Be sure to remember to keep the processing-java
at the end of the path!
To change settings in VSCode, here is a link to the official documentation.
(Remember, for Windows be sure to turn any "\
" into "\\
"!)
Example:
"processing.path": "C:\\Program Files\\processing-3.0.1\\processing-java",
NOTE: This is untested on Mac and Linux
[Research Needed]
Debugging support[Medium Priority]
Take nice looking (Animated?) screen shots for README/Instructions[Low Priority]
Create proper Mocha tests
Syntax highlighting and snippets code based on the Processing Sublime Text plugin.
Here are some other resources I recommend: