Telosys terminal in VSCode
Last updated
Last updated
Visual Studio Code includes a full featured integrated terminal that starts at the root of your workspace ( see https://code.visualstudio.com/docs/terminal/basics ).
This terminal is the ideal place to launch and use Telosys-CLI. So you can run all Telosys-CLI commands while staying in VSCode.
The most basic way to use Telosys in VSCode is to launch a standard terminal (predefined in VSCode) to get a shell and to launch Telosys from the command line.
But you will have to launch Telosys manually and to set the home directory each time you want to use it.
What's more, the terminal's name is "java", which is not self-explanatory.
To benefit from a dedicated Telosys terminal, simply create a "terminal profile", as described below...
VSCode allows to define specific terminal profiles ( see https://code.visualstudio.com/docs/terminal/profiles )
Here's how to define a terminal profile for Telosys by editing the "settings.json" file.
Launch the "command palette" with [ Ctrl ] + [ Shift ] + [ P ]
Search "open settings json"
Choose the JSON file to edit: "User Settings" JSON file (recommanded to be able to use the terminal in any workspace) or "Workspace Settings" JSON file (to store the file in the current workspace)
In section "terminal.integrated.profiles.windows" add an entry for "Telosys" with
"path" -> the command to launch = Java executable file
"args" -> the command arguments:
"-jar" + "full path to telosys-cli-X.X.X-nnn.jar" this is the ".jar" file to be executed by Java = telosys jar file do not forget to change it when you upgrade Telosys to a new version
"-h" + "." to define the current directory as the Telosys "home" ( for a VSCode terminal the current directory is the root of your workspace )
"overrideName" = "true" -> to replace the dynamic terminal title
"icon" -> optional (just to set a specific terminal icon )
"color" -> optional ( just to set the icon color )
Example:
After this configuration "Telosys" appears as a new kind of terminal in VSCode
so you just have to launch it and it is ready to use in the current workspace
Telosys terminal with "rocket" icon :