Use VSCodium

Configuration

If you have installed VSCodium the first time, there are some things to know. It's an IDE for all different kinds of programming languages and it makes use of extensions to support all of that. So one thing you can do is install some useful extensions to develop with the framework. The list of of extensions can be installed using a script under scripts/setup-codium.sh in the repository. Just navigate into the directory of the framework before.

cd vkcv-framework
./scripts/setup-codium.sh

On Windows you can also run the following command via PowerShell opened in the directory of the framework to install the extensions from the list in the text file under resources/extensions.txt:

Get-Content resources\extensions.txt | ForEach-Object {codium --install-extension $_}

These extensions include support for the CMake build process, C++ code completion, GitLab integration and proper debugging tools. So you will have everything you need without searching and going through all the available extensions. It's still possible to uninstall those extensions afterwards, supplement or replace them with others you prefer.

Now everything should be setup to launch VSCodium and open the cloned repository as project to start developing with the framework.


Development

When you startup VSCodium, select the local directory of the cloned framework and open it. The application will probably ask whether you trust the source code in this directory. Of course you can check and verify the source code at any time since the framework is fully open-source. But notice that the development of the framework did not focus on writing security critical code. So don't take transparency as a warranty.

Once the project has been loaded after accepting, it should run CMake automatically to create all build and launch targets. At least that should be the case if you have installed the CMake Tools extension.


This part will refer to the default layout of VSCodium. Any changes you make, extensions you remove or install might interfere with that. Look for the previous section about the configuration to make sure you have recommended extensions installed or at least you can find them to install if necessary. Especially the extensions clangd, CMake and CMake Tools are highly required to properly develop since you will need to write C++ code and CMake files for the build process.

On the left side of VSCodium you should find the overview of all files from the framework in the side bar. If not make sure the explorer view is selected in the activity bar in the left edge of the window. This view can be used for navigation in your own files later on but it will also allow you to lookup headers from the VkCV framework or its modules. To find all of this, take a look at the part of the tutorial about the application development.


Execution

In case you need a terminal to run a command in the frameworks directory, you can open a new terminal in the panel from the main menu at the top of the VSCodium window. This allows running scripts in a convenient way or run commands from Git without a separate terminal application open.

If you want to build and launch projects and own applications, you can find this functionality build into the status bar of VSCodium. With the extensions from above installed the status bar should contain the following buttons in this order (from left to right):

  • A button showing the active Git branch which allows to switch or create a new branch.
  • A small button to sync your local repository with the Git repository upstream, you have cloned the framework from.
  • A button with icons and numbers showing the result of warnings and errors from the last build.
  • A button showing the current CMake profile selected which allows switching the profile as well.
  • A button to select the used compiler to build the framework with.
  • A button to build the selected build target with the button to select this target right next to it.
  • A button with a play-symbol to run the selected launch target with the button to select this target right next to it.

Hopefully this explaination gives you an idea how to use VSCodium to develop with the VkCV framework.

Popular posts from this blog

Introduction

Application development

First setup