Skip to content

Installation of Docker, VSCode and its extensions

Jiawei Wang edited this page Jul 29, 2025 · 96 revisions

0. Prerequisite:

1. Working with VSCode in Docker containers

1.1 Install extensions in VSCode

*To install the extension, open the Extensions view (MAC: ⇧⌘X, Windows: Ctrl+Shift+X, Linux: Ctrl+Shift+X)
  • Extension(1): Docker extension
    • Search for docker to filter results and select Docker extension authored by Microsoft.

  • Extension(2): Remote Containers extension
    • Search for dev container to filter results and select extension authored by Microsoft.


1.2 Pull the pre-built image in Docker hub

Step1: Enter the command in cmd or terminal (shortcut to open a terminal: Ctrl+`):

  • Mac X86_64, Windows X86_64, Ubuntu Linux x86_64: docker pull svftools/software-analysis-studio:latest

  • Mac ARM (M1-M3 chips): docker pull svftools/software-analysis-studio:latest-arm64

Step2: Create and run a container of the image:

  • Mac X86_64, Windows X86_64, Ubuntu Linux x86_64: docker run -itd svftools/software-analysis-studio:latest /bin/bash

  • Mac ARM (M1-M3 chips): docker run -itd svftools/software-analysis-studio:latest-arm64 /bin/bash

image

1.3 Load Docker container in VSCode

Right click the container item and select 'Attach to Visual Studio Code'

image

If you can't see the working directory, please select file -> open (folder)... then enter the /home/SVF-tools/software-analysis-studio


1.4 Install/Enable C/C++ extension in container

- To install the extension, open the Extensions view (MAC: ⇧⌘X, Windows: Ctrl+Shift+X, Linux: Ctrl+Shift+X)

- Search for C/C++ and select Docker extension authored by Microsoft.


2. Run and debug your program

  • VSCode's built-in debugger helps your editing, compilation and debugging.
  • SVF-Teaching has prepared configurations in launch.json to debug hello.cpp
  • Take a look at this page which contains several troubleshootings when configuring VSCode debugging environment.
  • More information VSCode-debugging

2.1 Switching programs

When working on different assignments, change the "program" field in launch.json (line 9). Values can be assign-1 for Assignment 1, assign-2 for Assignment 2, assign-3 for Assignment 3, assign-4 for Assignment 4, hello for the hello world program, and codegraph for the code graph project.

Clone this wiki locally