前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >\[vscode issue\] Cannot read properties of undefined (reading 'addr')

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

作者头像
Kevinello
发布2023-03-01 12:45:43
1.1K0
发布2023-03-01 12:45:43
举报

现象

在一些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的情况:

https://kevinello-1302687393.file.myqcloud.com/picgo/2023/02/27/202302271603668-07bf1b.png
https://kevinello-1302687393.file.myqcloud.com/picgo/2023/02/27/202302271603668-07bf1b.png

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

https://kevinello-1302687393.file.myqcloud.com/picgo/2023/02/28/Untitled-ffaded.png
https://kevinello-1302687393.file.myqcloud.com/picgo/2023/02/28/Untitled-ffaded.png
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2023-02-28,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 现象
  • 修复方案
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档