A Save & Compile button for Jack programming in Visual Studio Code
- Download and install Power Tools and macros extensions for VS Code.
- Download and install Java. Make sure Java is added to PATH.
Download this .rar file, and extract its contents into your Jack project's folder.
After that, your Jack project's folder should have a .vscode folder, like shown here:
Open your Jack project using VSCode by clicking File -> Open Folder... and then selecting your Jack project's folder.
After a few seconds of VSCode loading your project, you'll notice a small Save & Compile button at the bottom-left corner of the IDE:
Clicking the Save & Compile button will save your entire project and will try to compile it. If the compiler encountered errors, it will pop-up error messages. Clicking each error message will redirect you to the problematic line of code in a specific file (problematic - by the compiler's prespective):
If compilation was succesful - the following message will pop-up:
As for now, you need to repeat these steps for each Jack project you create if you want to enjoy this functionality.
A Jack project's folder that doesn't have this specific .vscode folder in it - won't be able to be compiled in VS Code like described above.
The Nand2Tetris - Jack Language Syntax Highlighting extension is extemely recommended.
If you have any questions, you can send me an email to [email protected]