Skip to content

Configure Python IDE Environment

bjjwwang edited this page Jun 2, 2025 · 2 revisions

1. Prerequisite:

2. Run with VSCode

If you encounter some problem, please check this document Trouble-Shooting-for-IDE.

2.1 Working with VSCode in Docker containers

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.


Load Docker container in VSCode

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

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


Install/Enable Python Debugger extension in container

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

- Search for Python Debugger and select Docker extension authored by Microsoft.


2.2 Run and debug your program

  • VSCode's built-in debugger helps your editing, compilation and debugging.

  • Check that python interpreter should be /usr/bin/python3. Click Search - Show and Run Commands - Python: Select Interperter, and choose /usr/bin/python3, which should be Python 3.10.

  • Software-Security-Analysis has prepared configurations in launch.json in .vscode folder to debug test.py in ${workspaceFolder}/python/Assignment-1/Python folder.

Switching programs

When working on different labs/assignments, change the "program" and "args" fields in launch.json

Lab/Assignment "program" "args"
Assignment-1 "${workspaceFolder}/python/Assignment-1/Python/Main.py" "-icfg", "Assignment-1/Tests/testcases/icfg/test1.ll"
Assignment-2 "${workspaceFolder}/python/Assignment-2/Python/Main.py" "Assignment-2/Tests/testcases/sse/test1.ll"
Assignment-3 "${workspaceFolder}/python/Assignment-3/Python/Main.py" "Assignment-3/Tests/ae/test1.ll"
Clone this wiki locally