AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
177 stars 25 forks source link

How to compile the code in VS-Code [help wanted] #55

Closed ashishgupta1350 closed 6 years ago

ashishgupta1350 commented 6 years ago

The installation of package on VS-Code is non buggy and very straightforward but the "Compiling process is not beginner friendly". I am not able to compile processing code on VS-Code and run it. Can we have some animated gifs/ screenshots for the process?

Reference:

Command: Create Task File

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!

Edit: Upon pressing ctrl + shift + b, it produces this error:

Executing task: processing-java --force --sketch=/home/ashish/Desktop/ProcessingSketchbook --output=/home/ashish/Desktop/ProcessingSketchbook/out --run <

Not a valid sketch folder. /home/ashish/Desktop/ProcessingSketchbook/**ProcessingSketchbook.pde does not exist.**
The terminal process terminated with exit code: 1

Any Solutions

AvinZarlez commented 6 years ago

The error message you posted tells you exactly what is wrong:

Not a valid sketch folder. /home/ashish/Desktop/ProcessingSketchbook/ProcessingSketchbook.pde does not exist.

Nothing to do with VSCode, but Processing requires that your main .pde file name match exactly the folder name. Example: If I have a project called "TestProject" it needs a file located in where/ever/you/want/TestProject/TestProject.pde

Try renaming the main pde file you are working with to match the folder name, it should work then.