打赏

dlv远程调试

远程调试配置
(1.)将arm编译的dlv放到环境变量可以执行的地方

# dlv arm环境编译
git clone https://github.com/go-delve/delve
cd delve/cmd/dlv
GOARM=7 GOARCH=arm64 GOOS=linux go build -v

(2.)启动程序,如:

nohup ./test &
[1] 7887

(3.)启动dlv监听,7887为进程号

./dlv attach 7887 --headless --listen=:2345 --api-version=2 --accept-multiclient

(4.)goland配置

Debug Configurations --> remote debug --> Name: xxx  Host:192.168.x.x  port:2345 --> Apply

1652943775162
(5.)goland启动debug,提前打好断电,就会进入程序

img

参考链接

https://blog.csdn.net/zhangxm_qz/article/details/122154006

posted @ 2022-06-08 09:45  苍山落暮  阅读(426)  评论(0编辑  收藏  举报