Visual Studio Code is a powerful text editor which can be expanded to a full featured integrated development environment (IDE) with plugins. With the Visual Studio Code Remote - Containers extension you can use prebuilt Docker container as the runtime environment for your code development. This page serves as an alternative to the Getting Started-section. The following features make this a nice development environment:
web/content
.zsh
-terminal with sane defaults (oh-my-zsh
).build
-directory at the same level as the ogs
source code directory.F1
and type reopen in [container]
, press ENTER
.This takes now some time as the container is downloaded from the registry. Once finished you should see the following in the bottom status bar:
As an example use case we configure, build and debug the ogs executable.
CMake configuration is handled by using CMake presets which can be selected from the bottom status bar in VS Code. See the Configure and build with CMake Presets in Visual Studio Code for details.
In the editor:
ogs.cpp
main()
-function (around line 58) by clicking on the left gutter in the editor window (a red dot marks the enabled breakpoint).In the status bar:
debug
preset.Build
button.ogs
as the launch target.After some seconds the status bar color changes orange to indicate an active debugging session:
All of this works also via ssh. If you do not have Docker locally running but some server with Docker where you have ssh access to you can do the following:
ENTER
(Connect to host).F1
and type reopen in [container]
, press ENTER
.This article was written by Lars Bilke. If you are missing something or you find an error please let us know.
Generated with Hugo 0.122.0
in CI job 493443
|
Last revision: September 23, 2024
Commit: [MeL/IO/XDMF] Return also computed parent data type 09baf91
| Edit this page on