An Visual Studio Code Extension for compiling (PL)SQL code with SQLcl inside VScode
There are three ways to get this extension running.
- The easiest way is to just install it from the visual studio code marketplace.
- You can also download an installable file.
- If you want to adjust or expand the extension yourself you can follow the installing instructions .
After you have installed the extension you need to do a quick setup.
Required:
- Visual Studio Code (this extension was developed with version 1.40.1)
- SQLcl which is used to compile the code
Get VsCode here
Get SQLcl here
Recommended:
After you have successfully installed the extension you need to follow some setup steps to get it working
At first you need to add the path of your sqlcl installation
To do so press 'ctrl + shift + p', type in "settings" and choose "Preferences: Open Settings(UI)".
Then search for "vsql-developer" and add the path of your SQLcl installation.
Note: It may only work after you have restarted Visual Studio code.
The second step is to add your personal database connection strings
For this you have to create a file named "database_connectionStrings.json" in
the root folder of your project.
Now you can add some connections like shown in the image below.
Note: Just save the file. The extension will automatically recognize it.
Now you are ready to use vsql-developer
For this just click on the file containing the (PL)SQL code that you want to execute.
Then press 'ctrl + shift + p' and choose "Compile PLSQL".
Feel free to add a key to the "Compile PLSQL"-command.
- @S-Koell - Project Owner and Idea -
- @fd-primus - Development -
- Morten Braten whose guide and error file I used
- Trent Schafer odb-task extension for some inspiration
- PurpleBooth for the readme template