Sol Language
Provides support for the Sol programming language, for use in developing aviation applications running on SolOS. Read here for more information on Sol and the Sol language. Follow this link if you need a free download of SolOS or other tools.
This extension will install a language server and debug adapter for your operating system.
Supported operating systems: Windows, Ubuntu and MacOS.
Features include
- Tracing of where requirements are implemented in the code
- HTML preview (Sol is an extension of Markdown)
- Run a Sol application in SolOS
- Debug mode: live inspection of variables as they change
- Pause, Step or Continue in debug mode
- History: track how variables change over time
- Signals: view runtime errors as they occur, or in history, and find their root cause
- Log streams: send runtime debug information to a file
- Sol Syntax highlighting
- Basic code completion
- Background compilation, using the SolC compiler
- VSCode Problems tab: errors and warnings reported by the compiler
- View the hierarchy of a variable's dependencies, or the tree of it's references
- Go to a variable's definition, or show its references (F12 and Shft-F12)
Getting started
If you're new to VSCode
All VSCode commands can be run via the Command Palette, opened by pressing F1. You can search for partial matches of command titles. When this document refers to these commands, for example File: Open Folder
, you can press F1, search for it, and press Enter to run it.
Compile and run Sol source files
You can open a single sol file in VSCode, or a folder to use as a VSCode workspace.
Sol files are markdown files, and have one of these extensions: .sol
, .solspec
, .md
. If you open one of these files in VSCode, you will see the Sol icons activate in the editor.
- The last selected option from (2). Click it to re-issue the last command.
- Compiler commands
- Attach to SolOS: when you have already uploaded your app to SolOS, and want to start debugging.
- Compile and Run: when you want to compile and upload and run the application.
- Compile with SolC: when you want a new compilation, without uploading and running.
- Export SolApp file: when you want to compile and create the .SolApp file, without uploading it.
- Export and save as HTML file
- Preview HTML
- Regenerate markdown header numbering
Sol projects
Sol source files can import other sol files, making the root file a project.
It is recommended to open the folder (File: Open Folder
) in VSCode which contains the root file. In this way, you can manage all files under the folder via the Explorer treeview (Explorer: Focus on Folders View
)
You can also use the standard VSCode feature to define a launch.json
file under the .vscode
sub-folder. VSCode uses this file to determine the root file when running the Debug: Start Debugging
(F5) command.
You can create this file via the View: Show Run and Debug
command and then click create a launch.json file
In this file you can define the root for your project, and then select its name from the debug configuration dropdown, for example:
Debugging features
Language features
Code Completion
Configuration options
Editing via the VSCode configuration editor: use Extension Settings
from this extension, or search for @ext:Sol-One.sol-language-tools
in settings via F1, Preferences: Open Settings (UI)
Options include:
- Auto Preview Html: If true, will automatically open a side-by-side html preview panel. This html is generated by SolC.
- Auto Export to HTML: If true, will automatically generate an html file, when compilation succeeds.
- Auto Renumber Markdown Headings: If true, will automatically renumber markdown headings when saving.
- Auto Break on Signal: If true, will automatically pause live inspection when an error signal is detected.
- Include Standard Library: If false, will not pre-load the 'solstdlib' library for predefined templates and types. This will improve compilation performance.
- Library Path: Directory paths to search for imported files.
with default CSS.
- Html Style Sheet: A file path to a CSS file to use when rendering / exporting HTML for a sol spec. If the file does not exist, or is empty, it will be created
- Live Variable Mode: Display live variables inline or in a 'lens' between lines.
- Number of History Ticks: How many ticks of history to keep per variable value.
- Device Identifier: Configure the name of the SolOS device to use, per file, or per file pattern.
Recommended extension for auto-scrolling to the bottom of a log file while viewing a Stream:
Recommended extension for viewing CSV log files: