From 2a947d6c7ce28b5ba12b02af01177100684b76f8 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Tue, 19 Dec 2023 22:07:11 +0200 Subject: [PATCH] added tele debug config (wip) --- .vscode/launch.json | 12 ++++++++++++ .vscode/tasks.json | 8 +++++++- Dockerfile | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2cfd405..6606a9e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,6 +10,18 @@ "request": "launch", "preLaunchTask": "docker-run: debug", "platform": "node" + }, + { + "name": "Docker Python Launch", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/agent-py-bot/agent.py", + "console": "integratedTerminal", + "pythonPath": "${command:python.interpreterPath}", // Assumes Python extension is installed + "preLaunchTask": "docker-run: python-debug", // You may need to create this task + "env": { + "PYTHONUNBUFFERED": "1" + } } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 86aa6ff..ece303b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -41,6 +41,12 @@ "problemMatcher": [], "label": "npm: start", "detail": "node /app/web/server.js" - } + }, + { + "label": "python-debug", + "type": "shell", + "command": "docker exec -w /workspace -it my-python-container /bin/bash -c 'source activate py && python -m debugpy --listen 0.0.0.0:5678 agent-py-bot/agent.py'", + "problemMatcher": [] + } ] } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 022f909..923755c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,5 +75,5 @@ EXPOSE 8080 8081 # CMD ["npm", "start"] -# CMD ["npm", "run", "start:demo"] -CMD ["npm", "run", "start:tele"] \ No newline at end of file +CMD ["npm", "run", "start:demo"] +#CMD ["npm", "run", "start:tele"] \ No newline at end of file