improve the debugging experience (#101779)

improve debugging experience
pull/102022/head
Gábor Farkas 2 months ago committed by GitHub
parent f3fb9592da
commit 40b1b62502
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .vscode/launch.json
  2. 5
      pkg/build/cmd.go

@ -11,6 +11,11 @@
"cwd": "${workspaceFolder}",
"args": ["server", "--homepath", "${workspaceFolder}", "--packaging", "dev", "cfg:app_mode=development"]
},
{
"name": "Attach to Go Process",
"type": "go",
"request": "attach"
},
{
"name": "Attach to Test Process",
"type": "go",

@ -185,6 +185,11 @@ func doBuild(binaryName, pkg string, opts BuildOpts) error {
args := []string{"build", "-ldflags", lf}
if opts.isDev {
// disable optimizations, so debugger will work
args = append(args, "-gcflags", "all=-N -l")
}
if opts.goos == GoOSWindows {
// Work around a linking error on Windows: "export ordinal too large"
args = append(args, "-buildmode=exe")

Loading…
Cancel
Save