commit 83be140f0b909058809745e664d71b4ddf85c615
parent 9cfb69f75d3eb422e61de14d5090ea96d541bae9
Author: Daenney <daenney@users.noreply.github.com>
Date: Sat, 25 Feb 2023 18:15:30 +0100
[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.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.vscode/launch.json b/.vscode/launch.json
@@ -2,14 +2,18 @@
"version": "0.2.0",
"configurations": [
{
- "name": "Launch Package",
+ "name": "Debug Package",
"type": "go",
"request": "launch",
- "mode": "auto",
+ "mode": "debug",
"program": "${workspaceFolder}/cmd/gotosocial",
"args": [
"testrig", "start"
],
+ "buildFlags": "-tags='netgo osusergo static_build kvformat debugenv'",
+ "env": {
+ "DEBUG": "1",
+ },
"cwd": "${workspaceFolder}"
}
]