diff --git a/.air.toml b/.air.toml index 9c0f451f..1b0929ed 100644 --- a/.air.toml +++ b/.air.toml @@ -5,14 +5,14 @@ tmp_dir = "tmp" [build] args_bin = [] bin = "./tmp/main" - cmd = "go build -o ./tmp/main ./cmd/app/main.go" + cmd = "go build -gcflags='all=-N -l' -o ./tmp/main ./cmd/app/main.go" delay = 1000 exclude_dir = ["assets", "tmp", "vendor", "testdata", "test"] exclude_file = [] exclude_regex = ["_test.go"] exclude_unchanged = false follow_symlink = false - full_bin = "" + full_bin = "dlv exec --accept-multiclient --log --headless --continue --listen :2346 --api-version 2 ./tmp/main" include_dir = [] include_ext = ["go", "tpl", "tmpl", "html", "env"] kill_delay = "0s" diff --git a/.gitignore b/.gitignore index 774bda0f..6a8ecd12 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ tmp/ .terraform/ bin/ +.DS_Store diff --git a/dev.Dockerfile b/dev.Dockerfile index 77154435..7005aaea 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -14,6 +14,9 @@ RUN go mod download # install the air tool RUN go install github.com/cosmtrek/air@latest +# install the dlv debugger +RUN go install github.com/go-delve/delve/cmd/dlv@latest + # install goose for db migrations RUN go install github.com/pressly/goose/v3/cmd/goose@latest