From c3a6ca1def900bb52a4d17ec888040d0f02ca504 Mon Sep 17 00:00:00 2001 From: Admin <1+admin@noreply.git.dcntrlized.org> Date: Sat, 29 Aug 2026 16:01:10 +0100 Subject: [PATCH] chore(vscode): background Launch Backend + Debug Backend auto start/stop --- .vscode/launch.json | 24 ++++++++++++++++++++++++ .vscode/tasks.json | 15 ++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8ba65c6..9a0de71 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,6 +1,30 @@ { "version": "0.2.0", "configurations": [ + { + "name": "Debug Backend", + "type": "go", + "request": "attach", + "mode": "remote", + "port": 2346, + "host": "127.0.0.1", + "debugAdapter": "legacy", + "substitutePath": [ + { + "from": "${workspaceFolder}/src", + "to": "/app" + } + ], + "cwd": "${workspaceFolder}/src", + "showLog": true, + "preLaunchTask": "Launch Backend", + "postDebugTask": "Stop Backend", + "presentation": { + "hidden": false, + "group": "KeepNote", + "order": 0 + } + }, { "name": "Attach to KeepNote (Air)", "type": "go", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a9103be..645d857 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,20 @@ { "label": "Launch Backend", "type": "shell", - "command": "docker compose -f docker-compose.debug.yaml up -d --force-recreate", + "command": "docker compose -f docker-compose.debug.yaml up -d --force-recreate && until nc -z 127.0.0.1 2346 >/dev/null 2>&1; do sleep 1; done && echo DAE_BACKEND_READY", + "isBackground": true, + "problemMatcher": [ + { + "pattern": { + "regexp": "^.*$" + }, + "background": { + "activeOnStart": true, + "beginsPattern": ".*", + "endsPattern": "DAE_BACKEND_READY" + } + } + ], "presentation": { "reveal": "always", "panel": "shared"