formulahendry / vscode-code-runner

Code Runner for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
MIT License
2.16k stars 285 forks source link

auto detection of virtual env in vs-code workspsce #822

Open johnmba opened 3 years ago

johnmba commented 3 years ago

Is your feature request related to a problem? Please describe. As a beginner, it is difficult to set virtual env that works with code-runner and its stress when inter-switching multiple virtual env for a project as you have to update the python path in the executor map settings.

Describe the solution you'd like I think it will be fine to automatically detect the current virtual env in the workspace and update when there is a switch in virtual env; that is to let there be a trigger in code-runner that will always carry out such operations.

smacmannis commented 3 years ago

This would be a nice feature. I have implemented the work-around here: https://stackoverflow.com/questions/50966876/vs-code-code-runner-doesnt-work-with-virtualenvs