Skip to content

Commit

Permalink
Update air_template.go
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gjarmstrong authored Jun 25, 2024
1 parent 61e8d21 commit f84b036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/cli/start/air_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f84b036

Please sign in to comment.