Browse Source

[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.
pull/1557/head
Daenney 3 years ago committed by GitHub
parent
commit
83be140f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .vscode/launch.json

8
.vscode/launch.json vendored

@ -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}"
}
]

Loading…
Cancel
Save