Skip to content

Table of Contents

Visual Studio Code

The Visual Studio Code interactive app can be used for editing and running code on Puhti. Make sure to load the correct modules before launching the session for the debugger to work correctly.


The interactive app has Python, Jupyter and C/C++ extensions installed. Other extensions can be installed in the extensions tab in VSCode. Dependencies for the extensions need to be loaded or installed for the extensions to work correctly. E.g. the go module must be loaded before installing the golang extensions in VSCode.


Python environments can be loaded by loading the correct module before launching VSCode. Make sure to select the correct Python version in the bottom bar of VSCode as the correct Python is not always selected automatically.

For Python environments that don't use Singularity the default configuration generated by the Python extension should work for running and debugging Python applications. Python environments that use Singularity, e.g geoconda, python-data, pytorch, have some issues with running, debugging and linting in VSCode. To launch applications that use those environments the launch configuration needs to be modified.

Example launch.json:

    "version": "0.2.0",
    "configurations": [
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "python": "python3"
Currently the linter does not work with the Singularity environments.


The compiler used can be selected when launching the interactive app.

Changing compiler between the Intel compiler and gcc in the workspace may cause issues. Most of the problems can be solved by removing the launch and build configurations and creating them again.


If VSCode does not work properly you can clear the settings and launch the application again. This can be done done by deleting the folder ~/.local/share/csc-vscode.