且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Visual Studio代码中使用Delve调试器进行远程调试

更新时间:2023-09-26 08:43:22

以下工作:


  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!