5. Creating a Workspace
If VS Code is available, a .vscode
directory with all needed
configurations is generated when running .\fox.ps1 waf configure
.
The generated workspace is properly configured.
5.1. Launching VS Code
It is best to use the provided launcher script .\fox.ps1 ide
to open
VS Code as then all environment variables are automatically correctly set.
If using fox.py
is not desired the following steps need to be taken into
account:
All required build tools etc. need to be in path and environment variables need to be correctly set.
Open VS Code.
Goto
File->Open Folder
and select the cloned foxBMS 2 repository.
5.2. Build Tasks
Build commands are executed by running Build Tasks
.
A Build Task
is executed either selecting Terminal->Run Build Task
from
the menu or pressing Ctrl + Shift + B.
A list of possible build commands is shown and the desired one can be executed by clicking with the cursor or navigating with the arrow keys and pressing Enter.
5.3. Hints
These are the default shortcuts in VS Code. They can be adapted to fit the user’s needs.
Jumping to definition: F12
Show all references: Shift + F12
Find file: Ctrl + P
Open command palette: Ctrl + Shift + P
Search within active file: Ctrl + F
Search within whole project: Ctrl + Shift + F
Run Build Tasks: Ctrl + Shift + B
Open header file to active source file: Alt + O
Navigate history: Ctrl + Tab
Navigate back: Alt + Left
Navigate forward: Alt + Right