VS Code "terminal.integrated.env.osx"

Viewed 706

On VS Code, with python extension, I am trying to achieve a very basic thing : add the workspace directory to the python path, when running the code in the integrated terminal.

From reading the doc, the only thing I'd have to do is add this line to the workspace's setting.json file :

"terminal.integrated.env.osx": {
        "PYTHONPATH": "/path_to_workspace_dir/"
    }

However, this does not work. Trying to dig into it, I noticed the following:

  • Adding this to the Users's settings does work.
  • Adding other environment variables to the workspace's settings does work
  • So only the PYTHONPATH's variable of the workspace's settings does not work

How can I fix that issue?

0 Answers
Related