Skip to content

Installation of Docker, VSCode and its extensions

guanqin-123 edited this page Aug 3, 2021 · 92 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 remote 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:

docker pull svftools/svf-teaching:latest

Step2: Create and run a container of the image:

  • Mac & Linux: docker run -itd svftools/svf-teaching:latest /bin/bash

  • Windows: docker run -itd svftools/svf-teaching:latest


1.3 Load Docker container in VSCode

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


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++ to filter results and select Docker extension authored by Microsoft.


2. Run and debug your program

  • VSCode's built-in debugger helps accelerate your edit, compile and debug loop.
  • SVF-Teaching has prepared configurations in launch.json to debug hello.cpp
  • More information VSCode-debugging