'Environment vars passing to Robot Framework executions within VSCode

I am trying to write Robot Framework tests using Visual Studio Code. Everything seems promising otherwise, but I am not able to get environment variables passed to the test execution runs no matter what I try.

I have a Python library accessed from my test cases that looks up values in os.environ. I need to populate this somehow.

I have a launch.json configuration of type robotframework-lsp (Robot Framework Language Server), but at least the env parameter does nothing. Likewise having an envFile does nothing.

I'm a bit of a VSCode beginner and the earlier responses I have been able to google seem confusing.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source