[vscode issue] Cannot read properties of undefined (reading 'addr')

2023-03-01 12:45:43 浏览数 (1)

现象

在一些init函数中打下断点,执行时达到断点后,Debug Console 输出一下信息后会直接结束,无法继续进行调试

代码语言:javascript复制
Unhandled error in debug adapter: TypeError: Cannot read properties of undefined (reading 'addr')
    at GoDebugSession.convertDebugVariableToProtocolVariable (/root/.vscode-server/extensions/golang.go-0.37.1/dist/debugAdapter.js:16728:25)
    at /root/.vscode-server/extensions/golang.go-0.37.1/dist/debugAdapter.js:16249:55
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 2)

修复方案

根据找到vscode golang插件源码,ignore undefined的情况:

目前已通过PR合入vscode主干,将在0.38.0正式发布

ide

0 人点赞