Skip to content

Commit 01eb41a

Browse files
alcalawilSean
andauthored
Setup debugger (#134)
* setup debugger * add .DS_Store to gitignore --------- Co-authored-by: Sean <[email protected]>
1 parent 180db6d commit 01eb41a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.air.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ tmp_dir = "tmp"
55
[build]
66
args_bin = []
77
bin = "./tmp/main"
8-
cmd = "go build -o ./tmp/main ./cmd/app/main.go"
8+
cmd = "go build -gcflags='all=-N -l' -o ./tmp/main ./cmd/app/main.go"
99
delay = 1000
1010
exclude_dir = ["assets", "tmp", "vendor", "testdata", "test"]
1111
exclude_file = []
1212
exclude_regex = ["_test.go"]
1313
exclude_unchanged = false
1414
follow_symlink = false
15-
full_bin = ""
15+
full_bin = "dlv exec --accept-multiclient --log --headless --continue --listen :2346 --api-version 2 ./tmp/main"
1616
include_dir = []
1717
include_ext = ["go", "tpl", "tmpl", "html", "env"]
1818
kill_delay = "0s"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ tmp/
55
.terraform/
66
bin/
77

8+
.DS_Store

dev.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ RUN go mod download
1414
# install the air tool
1515
RUN go install github.com/cosmtrek/air@latest
1616

17+
# install the dlv debugger
18+
RUN go install github.com/go-delve/delve/cmd/dlv@latest
19+
1720
# install goose for db migrations
1821
RUN go install github.com/pressly/goose/v3/cmd/goose@latest
1922

0 commit comments

Comments
 (0)