feat: add vscode debugger
This commit is contained in:
parent
38601033af
commit
2db2cdc1ff
16
.vscode/launch.json
vendored
Normal file
16
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Debug Main.py",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/src/main.py",
|
||||
"console": "integratedTerminal",
|
||||
"env": {
|
||||
"PYTHONPATH": "${workspaceFolder}"
|
||||
},
|
||||
"preLaunchTask": "Setup Environment",
|
||||
}
|
||||
]
|
||||
}
|
12
.vscode/tasks.json
vendored
Normal file
12
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Setup Environment",
|
||||
"type": "shell",
|
||||
"command": "python",
|
||||
"args": ["activate_env.py"],
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
9
activate_env.py
Normal file
9
activate_env.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import subprocess
|
||||
import os
|
||||
|
||||
# Ativa o ambiente virtual
|
||||
subprocess.run([r'.\venv\Scripts\activate.bat'], shell=True)
|
||||
|
||||
# Configura as variáveis de ambiente
|
||||
os.environ['PATH'] = r'.\bin;' + os.environ['PATH']
|
||||
os.environ['PYTHONUTF8'] = '1'
|
Loading…
Reference in New Issue
Block a user