SST Visual Studio Code

This document describes how to build SST in Visual Studio Code along with Intellisense i.e., support for code-completion.

These instructions assume that you are using a Mac. Linux should require minimal modifications. Windows is beyond the scope of this document.

Visual Studio Code

Follow the directions here to install Visual Studio Code. Make sure to also install the C/C++ Extension.

Clone SST-Macro

  1. Clone SST-macro with git and open it with Visual Studio Code:
    git clone git@github.com:sstsimulator/sst-macro.git
    cd sst-macro
    code .
    
  2. In the Visual Studio Window, select ‘Terminal->New Terminal’:
    mkdir -p build/install
    # you may need to unset your proxy environment variables for the following command to work
    ./bootstrap.sh
    cd build
    ../configure --prefix=`pwd`/install
    # compiledb builds a "compile_commands.json" file
    pip install compiledb
    compiledb --no-build make
    make && make install
    
  3. Restart Visual Studio and select ‘Yes’ when presented with the following dialog: VS Code Intellisense dialog

  4. Indexing and code completion should now be ready to use.