Work with VS Code¶
Visual Studio Code (VS Code) is a popular code editor which can be customized by extensions (plug-ins). Since Artery is mostly a plain C++ project using CMake as its build tool, one can use VS Code instead of the Eclipse-based OMNeT++ IDE for development.
Requirements¶
Install VS Code along with its C/C++ and CMake Tools Extensions.
Building and Running Simulations¶
First, open Artery's folder with VS Code. Press Ctrl + Shfit + P to open VS Code's Command Palette and execute the following commands:
CMake: Scan for KitsCMake: Select a Kitto select a compiler kit (GCC/Clang)CMake: Set Build Targetand choose your scenario (in doubt:run_example)CMake: Buildto start the simulation
Debugging Simulations¶
- Add
launch.jsonto.vscode/. Adjust paths and arguments to your system/needs: - Add
tasks.jsonto.vscode/ - Execute
CMake: Select Variantand selectDebug - In case of doubt: execute
CMake: Clean Rebuild - Switch to debug view with Ctrl + Shfit + D
- Start debugging by pressing F5
Credits
Thanks to Alexander Willecke for contributing this page.
Last update:
August 20, 2023