我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

通过vagorant GO进行远程调试

I'm using vagrant with 16.04 image on host also ubuntu 16.04 On vagrant I start

$ dlv debug --headless --listen=:2345 --log

my launch my json:

enter image description here

but vscode start on local he is not connected to the port in vagrant :

config.vm.network :forwarded_port, guest: 2345, host: 2345, id: "debuggolang", host_ip: "localhost", auto_correct: true

when I try to put him in convention format :

enter image description here

break point doesn't stop

enter image description here

and dlv exit

Regards

I resolved it I need to put the path to the root of my project in:

remotePath

近期文章

  • 如何使用sqlx检查行是否存在?
  • 在给定数组中查找整数序列
  • 有什么方法可以在print语句中以不带7,-48…etc的漂亮方式显示输出?
  • 单元测试时如何包含go模板
  • 有什么通用的方法来检查os.Stdin或从空设备重定向的输入?
  • Dockerfile连接到ODBC(例如HPE Vertica)设置
  • “ go install”,“ govendor install + local”和“ govendor install + vendor,^ program”有什么区别?
  • 如何在golang上的现有ssh连接上创建sftp客户端
  • 使用io.Multiwriter创建跨包/子包的日志
  • 竞赛检测器运行时错误
  • Golang切片问题
  • 使用MySQL的表单插入既是主键又是默认值的字段
  • Golang编码/ JSON马歇尔添加空
  • Golang中功能范围的模拟
  • golang http(或gocraft)速率限制
  • 如何在Kubernetes中添加新软件包
  • 导入特定包装
  • 转到错误拨号TCP:协议不可用
  • gocron创建任务的多个实例
  • C++多线程调用JNI的问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华