From f84b036356c1b13894c67486da283402355daef6 Mon Sep 17 00:00:00 2001 From: Gene Armstrong Date: Tue, 25 Jun 2024 09:02:48 -0700 Subject: [PATCH] Update air_template.go Adds `-gcflags=all="-N -l"` to air cmd to disable inlining and optimizations that can interfere with debugging. https://github.com/golang/vscode-go/blob/master/docs/debugging.md#attach --- cmd/cli/start/air_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/cli/start/air_template.go b/cmd/cli/start/air_template.go index 7fe7d38..247f0ea 100644 --- a/cmd/cli/start/air_template.go +++ b/cmd/cli/start/air_template.go @@ -6,7 +6,7 @@ func defaultAirConfig(appName string) string { template := ` [build] bin = "./bin/%s" - cmd = "go build -o ./bin/%s ." + cmd = "go build -gcflags=all="-N -l" -o ./bin/%s ." exclude_dir = ["bin", "tests", "templates", "scripts", "db/migrations", "pkg/schemas"] kill_delay = 500 send_interrupt = true