goland 远程调试 remote debug

简介: goland 远程调试 remote debug
1、远程服务器装好go环境,并设置国内源

linux go安装

设置国内源

go env -w GOPROXY=https://goproxy.cn,direct
2、远程服务器安装dlv
git clone https://github.com/derekparker/delve.git
cd delve/cmd/dlv/
go build
go install
## 默认dlv 会在这里,如果找不到 find / -name dlv
ls /root/go/bin
3、关闭防火墙,需要开放对应的监听接口2345
4、远程服务器 运行dlv
dlv --listen=192.168.33.10:2345 --headless=true --api-version=2 --check-go-version=false --only-same-user=false --accept-multiclient exec ./xxx

5、在goland中配置debug监听服务器对应的端口2345

目录
相关文章
|
10月前
|
Kubernetes Linux Go
基于Goland和dlv远程调试Kubernetes组件
基于Goland和dlv远程调试Kubernetes组件
356 0
|
11月前
|
编译器 Go 开发工具
JetBrains GoLand 以debug运行Go程序时出现could not launch process: decoding dwarf section info at offset 0x0: too short报错之保姆级别解决方案
JetBrains GoLand 以debug运行Go程序时出现could not launch process: decoding dwarf section info at offset 0x0: too short报错之保姆级别解决方案
210 0
使用GoLand进行远程调试
使用GoLand进行远程调试
271 0
|
12月前
|
Java 编译器 Go
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
113 0
|
11月前
|
IDE Go 开发工具
Go开发IDE全览:GoLand vs VSCode全面解析
Go开发IDE全览:GoLand vs VSCode全面解析
459 0
|
IDE Go 开发工具
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
|
6天前
|
IDE Go 开发工具
8-13|Cannot run program "C:\Users\Administrator\AppData\Local\Temp\GoLand\___8go_build__go.exe" (in
8-13|Cannot run program "C:\Users\Administrator\AppData\Local\Temp\GoLand\___8go_build__go.exe" (in
|
4月前
|
IDE Linux Go
|
Linux Go Docker
goland如何把go项目打包进docker镜像
goland如何把go项目打包进docker镜像
393 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
1092 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
下一篇
无影云桌面