I'm using Remote-Containers to debug an FastApi app. The container has all the dependecies installed. When I try to debug using the vscode debugger I got the error No module named uvicorn
. But if I run uvicorn api.main:app
it works.
/usr/bin/env /usr/bin/python3 /Users/juracylopes/.vscode/extensions/ms-python.python-2022.10.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 59746 -- -m uvicorn api.main:app /Library/Developer/CommandLineTools/usr/bin/python3: No module named uvicorn
My launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: FastAPI",
"type": "python",
"request": "launch",
"module": "uvicorn",
"args": [
"api.main:app"
],
"jinja": true,
"justMyCode": true
}
]
} ```