Visual Studio Code

A popular IDE for developing and debugging code. To integrate your ActiveState runtime with your VS Code environment:

  1. Open a command terminal and, working from the directory containing your project’s activestate.yaml file (or a subdirectory of that directory), enter state export env and wait for the executable file location to be returned.

alt_text

  1. Next open Visual Studio Code and create a new Python file or open an existing one.

alt_text

  1. Find the default language version in the bottom right of the program window (Python 3.9.15 64-bit in the above image)
  2. Click the language version to bring up the “Selected Interpreter” dropdown.
  3. Click + Enter interpreter path

alt_text

  1. Copy the executable file location from your state export env command in Step 1 and paste it into the “enter a path for a Python interpreter” field provided.
  2. Press Enter to switch to the new interpreter

On the bottom right of the window you will see the default interpreter path, Python 3.9.15 64-bit in the image above, has been changed to the new interpreter Python 3.9.14(exec;venv) in the image shown below.

alt_text

You have now integrated your ActiveState Python runtime with your Visual Studio Code environment. Any work done on this file will use your project’s specific language interpreter.

Making changes to your runtime

After adding, removing, or adjusting your project’s packages using the ActiveState Platform or the State Tool you may need to restart your IDE for the changes to take effect.