When implementing a Visual Studio extension to be used with Python files in the VSCode editor, how can one programmatically get the path of currently selected Python environment?
My guess is that it is done with python.pythonPath, but I can't seem to make it work. If I use that directly within an extension js, it crashes. I also tried:
let python = vscode.extensions.getExtension('python');
python.pythonPath