笔者想要研究下 channel 的源码,但是发现 vscode 的 debug 功能居然不能用了,真的是惨绝人寰,惨无人道啊,只能被迫开启重装之旅了。
笔者的英语水平有限,给 vscode 安装了中文的插件,所以提示的报错如下:
调试适配器进程意外终止
Error: Debug Adapter Process Has Terminated Unexpectedly
在疯狂的 google 查询下,尝试了
在十分艰难的尝试后,凭着笔者严谨的逻辑思考能力,终于想出了解决办法。
重装 vscode 是不是一个皆大欢喜的答案呢?其实并不是,重装的关键是要知道如何干净的卸载一个软件。
rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist
rm -fr ~/Library/Preferences/com.microsoft.VSCode.plist
rm -fr ~/Library/Caches/com.microsoft.VSCode
rm -fr ~/Library/Caches/com.microsoft.VSCode.ShipIt/
rm -fr ~/Library/Application Support/Code/
rm -fr ~/Library/Saved Application State/com.microsoft.VSCode.savedState/
rm -fr ~/.vscode/
notice :
Here are all the places where VSCode stores stuff on Mac OS X, besides the Visual Studio Code.app itself, which is in your Applications
folder
访问 vscode 的官网 / 找到适合版本安装即可
笔者怀着无比忐忑的心情,重新安装好 vscode,然后运行 debug 的时候,终端又一次的给了我惊喜,请看:
Version of Go is too old for this version of Delve (minimum supported version 1.10, suppress this error with --check-go-version=false)
安装完 golang 的 1.11.4 版本以后,笔者搓搓手又一次开始了尝试之旅,然而结果是:
could not launch process: executables built by Go 1.11 or later need Delve built by Go 1.11 or later
go get -u github/derekparker/delve/cmd/dlv
在多次被现实打击以后,工具的问题总算解决好了,但是 channel 的源码要等下会分解了。?,我只是想想好好的看个代码……
本文发布于:2024-01-31 09:02:29,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170666295227398.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |