'How to debug Django while using pipenv and VS Code?
I'm been using VS code and venv for my Django projects and have been able to debug using the tutorial provided by Microsoft here.
https://code.visualstudio.com/docs/python/tutorial-django
However, I have now switched to pipenv instead which I activate using the commmand pipenv shell.
When I now run using the Django debug configuration I get an error.
Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable?
Did you forget to activate a virtual environment?
I can't find any resources to guide me on this.
Do I need to change the launch.json file to make it work with pipenv?
Solution 1:[1]
you just need to choose an interpreter in my case, all pipenv interpreters are located in the ~/.virtualenvs folder here is the screenshot
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Adilet Usonov |
