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

目录
相关文章
|
4月前
|
Kubernetes Linux Go
基于Goland和dlv远程调试Kubernetes组件
基于Goland和dlv远程调试Kubernetes组件
155 0
|
7月前
使用GoLand进行远程调试
使用GoLand进行远程调试
146 0
|
6月前
|
Java 编译器 Go
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
Go 语言 入门 && 基于 GoLand 2023.1 创建第一个Go程序
58 0
|
5月前
|
IDE Go 开发工具
Go开发IDE全览:GoLand vs VSCode全面解析
Go开发IDE全览:GoLand vs VSCode全面解析
207 0
|
IDE Go 开发工具
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
【Go·编辑器IDE】GoLand集成开发环境安装及使用教程
|
5月前
|
编译器 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报错之保姆级别解决方案
56 0
|
8月前
|
Linux Go Docker
goland如何把go项目打包进docker镜像
goland如何把go项目打包进docker镜像
315 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
935 0
Go-解决低版本Goland调试问题:Version of Delve is too old for this version...
|
编译器 Go
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天
153 0
【七天入门Go语言】Goland && Golang 的安装与配置 | 第一天