使用GoLand进行远程调试

简介: 使用GoLand进行远程调试

部署进行配置


在此配置远程服务器地址,映射,是否自动上传(更新)等

选择SFTP类型

微信截图_20230925173113.png

微信截图_20230925173122.png

微信截图_20230925173130.png

选择上传

微信截图_20230925173139.png

另外给自动上传选项打钩

此时在本地修改某个文件,远程机器相应目录的文件,也会被同步修改




远程调试进行配置

微信截图_20230925173231.png

远程机器需要安装delve

而后在远程机器的相应目录执行

dlv debug ./cmd(此处为main.go所在目录;如果main.go就在根目录,则无需这一部分) --headless --listen=:2345 --api-version=2 --accept-multiclient

微信截图_20230925173254.png

每次debug结束后,想进行新的debug,还需要再次执行上面的命令

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