From 136d848a5750fdc0e3f8a5fd81295f6b82088c0e Mon Sep 17 00:00:00 2001 From: Admin <1+admin@noreply.git.dcntrlized.org> Date: Sat, 29 Aug 2026 15:31:55 +0100 Subject: [PATCH] chore(vscode): unify Launch/Follow/Stop Backend tasks; Delve on 2346 --- .vscode/launch.json | 32 +------------------------------- .vscode/tasks.json | 28 ++++++++++++---------------- docker-compose.debug.yaml | 7 ++++--- 3 files changed, 17 insertions(+), 50 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ab7369e..8ba65c6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "go", "request": "attach", "mode": "remote", - "port": 2345, + "port": 2346, "host": "127.0.0.1", "debugAdapter": "legacy", "substitutePath": [ @@ -17,41 +17,11 @@ ], "cwd": "${workspaceFolder}/src", "showLog": true, - // "trace": "verbose", "presentation": { "hidden": false, "group": "KeepNote", "order": 1 } - }, - { - "name": "Launch browser", - "type": "editor-browser", - "request": "launch", - "url": "http://localhost:7000", - "presentation": { - "hidden": true, - "group": "", - "order": 1 - } - }, - { - "name": "Launch dev server (python)", - "type": "debugpy", - "module": "http.server", - "args": ["7000", "-d", "${workspaceFolder:KeepNote}/dev/"], - "request": "launch", - "presentation": { - "hidden": true, - "group": "", - "order": 1 - } - } - ], - "compounds": [ - { - "name": "Launch Debug Dev UI", - "configurations": ["Launch dev server (python)", "Launch browser"] } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 099c0f3..a9103be 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,29 +2,25 @@ "version": "2.0.0", "tasks": [ { - "label": "Start KeepNote Environment", + "label": "Launch Backend", "type": "shell", - "command": "docker compose -f docker-compose.debug.yaml up --build", - "isBackground": true, - "problemMatcher": [ - { - "pattern": { - "regexp": "^.*$" - }, - "background": { - "activeOnStart": true, - "beginsPattern": "Building", - "endsPattern": " ✔ Container" - } - } - ], + "command": "docker compose -f docker-compose.debug.yaml up -d --force-recreate", "presentation": { "reveal": "always", "panel": "shared" } }, { - "label": "Stop KeepNote Environment", + "label": "Follow Backend Logs", + "type": "shell", + "command": "docker compose -f docker-compose.debug.yaml logs -f", + "presentation": { + "reveal": "always", + "panel": "shared" + } + }, + { + "label": "Stop Backend", "type": "shell", "command": "docker compose -f docker-compose.debug.yaml down", "presentation": { diff --git a/docker-compose.debug.yaml b/docker-compose.debug.yaml index 8698691..36ea615 100644 --- a/docker-compose.debug.yaml +++ b/docker-compose.debug.yaml @@ -22,9 +22,10 @@ services: # Expose ports: host:container ports: - "8081:8080" # Application port - # Delve: no host port — auth-debug owns 2345; attach via the container's - # 2345 when needed. - # - "8081:8081" # HTTP Dev interface + # Delve: unique host port per service (auth-debug owns 2345), so the Go + # attach launch config reaches Air's Delve listener (in-container 2345) + # from the host without conflicts. + - "2346:2345" # Delve debugger port # Volume mounts - THE KEY TO HOT RELOADING