diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..867839f --- /dev/null +++ b/.vscode/launch.json @@ -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", + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..adfbdac --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Setup Environment", + "type": "shell", + "command": "python", + "args": ["activate_env.py"], + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/activate_env.py b/activate_env.py new file mode 100644 index 0000000..6f0aa15 --- /dev/null +++ b/activate_env.py @@ -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' \ No newline at end of file