gpt4 book ai didi

go - 通过 vagrant GO 进行远程调试

转载 作者:数据小太阳 更新时间:2023-10-29 03:24:44 31 4
gpt4 key购买 nike

我在主机上使用带有 16.04 图像的 vagrant 也是 ubuntu 16.04在 vagrant 我开始

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

我启动我的 json:

enter image description here

但是 vscode 在本地启动时他没有连接到 vagrant 中的端口:

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

当我尝试将他置于约定格式时:

enter image description here

断点不停

enter image description here

和dlv退出

问候

最佳答案

我解决了我需要将项目根目录的路径放在:

remotePath

关于go - 通过 vagrant GO 进行远程调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45109131/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com