[chore] Update vscode launch configuration (#1556)

In order to get testrig we have to build with the debugenv tag and run
with the DEBUG environment variable. Since this is a Debug build this
also updates the launch configuration name to reflect that.

We do not build with `-ldflags="-s -w"` since that strips debug info.

This makes it possible to launch GtS from VS Code in debug mode, set
breakpoints in the editor etc.
This commit is contained in:
Daenney 2023-02-25 18:15:30 +01:00 committed by GitHub
parent 9cfb69f75d
commit 83be140f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

8
.vscode/launch.json vendored
View File

@ -2,14 +2,18 @@
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Launch Package", "name": "Debug Package",
"type": "go", "type": "go",
"request": "launch", "request": "launch",
"mode": "auto", "mode": "debug",
"program": "${workspaceFolder}/cmd/gotosocial", "program": "${workspaceFolder}/cmd/gotosocial",
"args": [ "args": [
"testrig", "start" "testrig", "start"
], ],
"buildFlags": "-tags='netgo osusergo static_build kvformat debugenv'",
"env": {
"DEBUG": "1",
},
"cwd": "${workspaceFolder}" "cwd": "${workspaceFolder}"
} }
] ]