Skip to content

Commit c042b3d

Browse files
authored
Merge pull request #4 from tech-thinker/dlv-debugger-added
dlv debugger added to makefile
2 parents ccace94 + 737b4e8 commit c042b3d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ uninstall:
3131
rm /usr/local/share/man/man1/telepath.1
3232

3333
build:
34-
go build -ldflags="$(LDFLAGS)" -o telepath
34+
go build -gcflags="all=-N -l" -ldflags="$(LDFLAGS)" -o telepath
3535

3636
dist:
3737
cp man/telepath.1 man/telepath.old
@@ -70,4 +70,19 @@ dist:
7070

7171
clean:
7272
rm -rf telepath*
73-
rm -rf build
73+
rm -rf build
74+
75+
# For headless debugging
76+
debug-srv-headless: build
77+
dlv exec telepath --headless --listen=:2345 --api-version=2 -- daemon start --daemon-child
78+
79+
# Will connect remote debugger
80+
debug-connect:
81+
dlv connect :2345
82+
83+
# Will debug daemon locally
84+
debug: build
85+
dlv exec telepath -- daemon start --daemon-child
86+
# For client debugging you need to start similar command line this
87+
# dlv exec telepath -- daemon status
88+
# dlv exec telepath -- host list

0 commit comments

Comments
 (0)