[问题] CMake在vscode中debug出现错误

楼主: fishxd1096 (UN_ReAL)   2021-06-19 16:42:36
开发平台(Platform): (Ex: Win10, Linux, ...)
Linux
编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出)
GCC
问题(Question):
我照着VSCODE官方的CMake Hello World教学操作,可以编译、可以执行,但是进行debug时出现错误。
(我不会用CMake,只知道是用来Build专案的工具,所以想透过这个hello world开始学习)
我选择的Kit
https://imgur.com/FNCF113
Build讯息
https://imgur.com/rwZKcCJ
可以在断点停下
https://imgur.com/ZQo2hgq
Debug讯息
https://imgur.com/sSEm6x5
但按下Step后就错误了
https://imgur.com/19nicB8
我在该路径应该放什么档案吗?我的根目录没有build这个资料夹
https://imgur.com/BT7GIU4
我前阵子google了很久还是不知道怎么解决,所以决定询问大家
作者: Sanvean   2021-06-19 17:15:00
你是用 Step in, Step out 还是 Step over? 我猜是用到Step in,然后进到没有 debug 资讯的 library 里了。当你在 cout 那一行要 Step in 的时候应该会进到Standard Library,如果没有特别安装或自己编译,stdlib不是没有 debug 资讯就是没有对应可以 debug 的原始码。

Links booklink

Contact Us: admin [ a t ] ucptt.com