vscode debug asctions

This commit is contained in:
2026-01-18 01:43:10 +00:00
parent 5e82fc5914
commit f35debb152
3 changed files with 62 additions and 1 deletions
-1
View File
@@ -1,4 +1,3 @@
.vscode
prompts prompts
mend mend
__debug* __debug*
+28
View File
@@ -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"
}
]
}
+34
View File
@@ -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:"
}
}
}
]
}