- https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-1/
- https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-2/
- https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-3/
To get debugging within the Poetry module working correctly, create a custom launch config
The key is to add:
"env": {"PYTHONPATH": "${cwd}"
Full example:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {"PYTHONPATH": "${cwd}"
}
]
}
poetry install