vscode
About 37 wordsLess than 1 minute
DEBUG
If you want to debug fba in VS Code, create a .vscode/launch.json file and add the following configuration:
{
"version": "0.2.0",
"configurations": [
{
"name": "fba 调试程序",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/backend/run.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/backend",
// 指定 python 解释器,请根据实际情况自行修改
//"python": "${workspaceFolder}/.venv/bin/python", // MacOS or Linux
//"python": "${workspaceFolder}/.venv/Scripts/python.exe", // Windows
"env": {
"PYTHONPATH": "${workspaceFolder};${env:PYTHONPATH}"
},
"envFile": "${workspaceFolder}/backend/.env",
"justMyCode": true
},
{
"name": "Python 调试程序",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
// 指定 python 解释器,请根据实际情况自行修改
//"python": "${workspaceFolder}/.venv/bin/python", // MacOS or Linux
//"python": "${workspaceFolder}/.venv/Scripts/python.exe", // Windows
"env": {
"PYTHONPATH": "${workspaceFolder};${env:PYTHONPATH}"
},
"envFile": "${workspaceFolder}/backend/.env",
"justMyCode": true
}
]
}Screenshot


