From c142686073d381511d90e35ff2fcfa84de307a14 Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 12:36:32 +0500 Subject: [PATCH 1/8] Debugging --- .vscode/launch.json | 24 ++++++++++++++++++++++++ docker-compose.debug.yml | 10 ++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 docker-compose.debug.yml diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..ad31862 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "name": "Python Debugger: Remote Attach", + "type": "debugpy", + "request": "attach", + "connect": { + "host": "localhost", + "port": 5678 + }, + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "." + } + ] + } + ] +} \ No newline at end of file diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml new file mode 100644 index 0000000..ace5350 --- /dev/null +++ b/docker-compose.debug.yml @@ -0,0 +1,10 @@ +version: '3.9' +services: + backend: # This service name must match the one in the main docker-compose.yml + command: > + sh -c " + python -m debugpy --wait-for-client --listen 0.0.0.0:5678 + -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload + " + ports: + - "5678:5678" # Expose the debugger port \ No newline at end of file From a3903c7af46f5494893168369c266744b51bd708 Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 12:39:10 +0500 Subject: [PATCH 2/8] Added DebugPy --- backend/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 40eaa87..8007611 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -40,5 +40,8 @@ RUN chmod +x /code/prestart.sh RUN --mount=type=cache,target=/root/.cache/uv \ uv sync + +# Install DebugPy to Debug: +RUN uv pip install debugpy ENTRYPOINT ["sh", "entrypoint.sh"] From e09027bd81b0b22595bfea3f6e022e53888b5f0f Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 16:14:57 +0500 Subject: [PATCH 3/8] Debugging update --- docker-compose.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3fa01f9..93f9e14 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: build: ./backend ports: - "8000:8000" + - "5678-5678" depends_on: - db environment: @@ -29,8 +30,11 @@ services: - USERS_OPEN_REGISTRATION=true volumes: - ./backend:/app - command: sh -c "./prestart.sh && uvicorn src.main:app --reload --host 0.0.0.0 --port 8000" - + command: sh -c " + pip install debugpy && + python -m debugpy --wait-for-client --listen 0.0.0.0:5678 + -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload + " frontend: build: ./frontend ports: From e0e77e13895dec8f7cc39f9972345428b7acc119 Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 16:16:24 +0500 Subject: [PATCH 4/8] Update --- .vscode/launch.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ad31862..2b7c448 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,8 +1,4 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", "configurations": [ { From 63e5d5393652cff01f31930eec8288c53561cc0d Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 16:23:32 +0500 Subject: [PATCH 5/8] Update --- docker-compose.debug.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml index ace5350..e8d3aa9 100644 --- a/docker-compose.debug.yml +++ b/docker-compose.debug.yml @@ -1,4 +1,3 @@ -version: '3.9' services: backend: # This service name must match the one in the main docker-compose.yml command: > From 5f30a9a722d0a503847fddcde919a061e044b0b7 Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 16:34:48 +0500 Subject: [PATCH 6/8] Update --- docker-compose.debug.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml index e8d3aa9..1ab06e9 100644 --- a/docker-compose.debug.yml +++ b/docker-compose.debug.yml @@ -1,9 +1,12 @@ +version: '3.9' services: - backend: # This service name must match the one in the main docker-compose.yml + backend: command: > sh -c " - python -m debugpy --wait-for-client --listen 0.0.0.0:5678 - -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload + # Install debugpy first + pip install debugpy -q && + # Then start with debugger waiting + python -m debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload " ports: - - "5678:5678" # Expose the debugger port \ No newline at end of file + - "5678:5678" # ADD this line - crucial for VS Code to connect \ No newline at end of file From e21a5201fe4e8c78ec9106767cd0c208cbf91cb4 Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 16:42:03 +0500 Subject: [PATCH 7/8] Update --- docker-compose.debug.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml index 1ab06e9..36370a7 100644 --- a/docker-compose.debug.yml +++ b/docker-compose.debug.yml @@ -1,12 +1,11 @@ -version: '3.9' +# docker-compose.debug.yml services: backend: command: > sh -c " - # Install debugpy first - pip install debugpy -q && - # Then start with debugger waiting + pip install debugpy && python -m debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload " ports: - - "5678:5678" # ADD this line - crucial for VS Code to connect \ No newline at end of file + - "5678:5678" + # Remove the `version` line entirely \ No newline at end of file From dba8c0ae206885723655ee23b390d4734f736a3b Mon Sep 17 00:00:00 2001 From: EmadFahim134 Date: Tue, 6 Jan 2026 17:15:28 +0500 Subject: [PATCH 8/8] Remove Debugging Files --- .vscode/launch.json | 20 -------------------- .vscode/settings.json | 22 ---------------------- docker-compose.debug.yml | 11 ----------- 3 files changed, 53 deletions(-) delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json delete mode 100644 docker-compose.debug.yml diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 2b7c448..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "configurations": [ - - { - "name": "Python Debugger: Remote Attach", - "type": "debugpy", - "request": "attach", - "connect": { - "host": "localhost", - "port": 5678 - }, - "pathMappings": [ - { - "localRoot": "${workspaceFolder}", - "remoteRoot": "." - } - ] - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 2df501b..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "[typescript]": { - "editor.defaultFormatter": "biomejs.biome", - "editor.formatOnSave": true - }, - "[typescriptreact]": { - "editor.defaultFormatter": "biomejs.biome", - "editor.formatOnSave": true - }, - "[javascript]": { - "editor.defaultFormatter": "biomejs.biome", - "editor.formatOnSave": true - }, - "[javascriptreact]": { - "editor.defaultFormatter": "biomejs.biome", - "editor.formatOnSave": true - }, - "editor.codeActionsOnSave": { - "source.organizeImports.biome": "explicit", - "source.fixAll.biome": "explicit" - } -} diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml deleted file mode 100644 index 36370a7..0000000 --- a/docker-compose.debug.yml +++ /dev/null @@ -1,11 +0,0 @@ -# docker-compose.debug.yml -services: - backend: - command: > - sh -c " - pip install debugpy && - python -m debugpy --wait-for-client --listen 0.0.0.0:5678 -m uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload - " - ports: - - "5678:5678" - # Remove the `version` line entirely \ No newline at end of file