improve the debugging experience (#101779)

improve debugging experience
This commit is contained in:
Gábor Farkas
2025-03-13 11:10:07 +01:00
committed by GitHub
parent f3fb9592da
commit 40b1b62502
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -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",
+5
View File
@@ -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")