From f35debb1523a115c6698f737ceccd0d6ca9f471f Mon Sep 17 00:00:00 2001 From: ruinivist Date: Sun, 18 Jan 2026 01:43:10 +0000 Subject: [PATCH] vscode debug asctions --- .gitignore | 1 - .vscode/launch.json | 28 ++++++++++++++++++++++++++++ .vscode/tasks.json | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 96842e8..c07602d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.vscode prompts mend __debug* diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..93c9caa --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // 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": "Attach (bubbletea)", + "type": "go", + "debugAdapter": "dlv-dap", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1", + "preLaunchTask": "Run headless dlv" + }, + { + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": 2345, + "host": "127.0.0.1" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..58776ea --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,34 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run headless dlv", + "type": "process", + "command": "dlv", + "args": [ + "debug", + "--headless", + "--listen=:2345", + "--api-version=2", + "--continue", + "--accept-multiclient", + ".", + "--", + "sample" + ], + "isBackground": true, + "problemMatcher": { + "owner": "go", + "fileLocation": "relative", + "pattern": { + "regexp": "^couldn't start listener:" + }, + "background": { + "activeOnStart": true, + "beginsPattern": "^API server listening at:", + "endsPattern": "^API server listening at:" + } + } + } + ] +}