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

[BUG] No warning for invalid code #92

Closed SonOfDiablo closed 3 years ago

SonOfDiablo commented 3 years ago

Describe the bug I was trying to run a small test sketch through Visual Studio Code and nothing happened. After about half an hour of trying to add/re-add/change the Environment Path and the tasks.json, I finally decided to try and run the sketch in Processing and noticed a small typo backgrounnd instead of background and sure enough after fixing that typo everything started to work as expected!

To Reproduce Steps to reproduce the behavior:

  1. Make a typo
  2. Run processing project

Expected behavior Some kind of indication that the sketch contains an error would be great! I'm not sure how much you are able to do, but something as simple as the red squiggles under something that is wrong would be a great improvement.

VSCode (please complete the following information):

AvinZarlez commented 3 years ago

Can you share the output logs when your run the task in VSCode?

Assuming you can run processing from your path (can test in a console, either in or out of VSCode) running from VSCode should output the error in those logs.

SonOfDiablo commented 3 years ago

It does indeed tell you in the terminal. I must have missed that.

> Executing task: processing-java --force "--sketch=C:\Users\usr\Documents\scripts\Processing\TestSketch" "--output=C:\Users\usr\Documents\scripts\Processing\TestSketch\out" --run <

TestSketch.pde:39:0:39:0: The function backgrounnd(int) does not exist.
The terminal process "cmd.exe /d /c processing-java --force "--sketch=C:\Users\usr\Documents\scripts\Processing\TestSketch" "--output=C:\Users\usr\Documents\scripts\Processing\TestSketch\out" --run" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Thank you for pointing this out :)