From 83be140f0b909058809745e664d71b4ddf85c615 Mon Sep 17 00:00:00 2001 From: Daenney Date: Sat, 25 Feb 2023 18:15:30 +0100 Subject: [PATCH] [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. --- .vscode/launch.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 906262d2f..714f11b63 100644 --- 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}" } ]