如何在Visual Studio代码中使用Delve调试器进行远程调试 [英] How to remote debug with Delve debugger in Visual Studio Code

查看:167
本文介绍了如何在Visual Studio代码中使用Delve调试器进行远程调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经问过了,并且得到了一个很好的回答使用delve(golang调试器)进行本地调试。



现在我试图使用VS Code远程调试Delve。



我有一个示例应用程序,其中提到了此处,并且进一步链接到了github源代码此处。注意:调试项目位于一个名为调试的分支中。



您是否能够使其工作?



我还在回购中创建/打开了一个问题。

解决方案

以下工作:


  1. jsondebugServer:4711,

  2. 将launch.json中的第29行改为host:192.168.99.100// Docker IP为127.0.0.1 li>

我确信我之前尝试过这种方式,但显然不会在同一时间回合
无论如何快乐去'幸运! p>

I have already asked, and got a very good answer for debugging locally with delve(golang debugger).

Now I am trying to remote debug with Delve using VS Code.

I have got a sample app mentioned here, and further github linked to source code here. Note: The debug project is in a branch called debugging.

Are you able to make it work?

I have also created/opened an issue in the repo.

解决方案

The following worked:

  1. Remove line 3 in launch.json "debugServer": 4711,"
  2. Changed line 29 in launch.json ""host": "192.168.99.100" // Docker IP " to "127.0.0.1".

I was sure I tried this before, but apparently not bout at the same time. Anyways happy go' lucky!

这篇关于如何在Visual Studio代码中使用Delve调试器进行远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆