mobile wallpaper 1
mobile wallpaper 2
mobile wallpaper 3
mobile wallpaper 4
mobile wallpaper 5
mobile wallpaper 6
mobile wallpaper 7
mobile wallpaper 8
mobile wallpaper 9
mobile wallpaper 10
mobile wallpaper 11
mobile wallpaper 12
mobile wallpaper 13
mobile wallpaper 14
mobile wallpaper 15
mobile wallpaper 16
mobile wallpaper 17
mobile wallpaper 18
mobile wallpaper 19
mobile wallpaper 20
mobile wallpaper 21
mobile wallpaper 22
mobile wallpaper 23
mobile wallpaper 24
mobile wallpaper 25
mobile wallpaper 26
mobile wallpaper 27
mobile wallpaper 28
mobile wallpaper 29
mobile wallpaper 30
mobile wallpaper 31
mobile wallpaper 32
mobile wallpaper 33
mobile wallpaper 34
mobile wallpaper 35
mobile wallpaper 36
mobile wallpaper 37
mobile wallpaper 38
mobile wallpaper 39
mobile wallpaper 40
mobile wallpaper 41
mobile wallpaper 42
mobile wallpaper 43
mobile wallpaper 44
mobile wallpaper 45
mobile wallpaper 46
mobile wallpaper 47
mobile wallpaper 48
mobile wallpaper 49
mobile wallpaper 50
mobile wallpaper 51
mobile wallpaper 52
mobile wallpaper 53
mobile wallpaper 54
mobile wallpaper 55
mobile wallpaper 56
mobile wallpaper 57
mobile wallpaper 58
mobile wallpaper 59
mobile wallpaper 60
mobile wallpaper 61
mobile wallpaper 62
mobile wallpaper 63
mobile wallpaper 64
mobile wallpaper 65
208 字
1 分钟
VSCode gdb调试时报错
2025-04-20

省流#

.vscode/tasks.jsonargs里的"-static",去掉就解决了

正文#

环境#

环境为 Windows 11 + Arch Linux WSL + VSCode + clangd & 微软C/C++插件(关闭了IntelliSense)

问题怎么来的怎么解决的#

之前为了模仿CCF测评机的编译选项,就把tasks.json改了改。
然后问题就开始出现了:每次调试时都会有&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"的报错,并且无法使用断点调试

我新创建了一个文件夹,重新生成了一边配置,写个Hello World发现果然没事。然后一个一个把launch.jsontasks.json里的配置删了试试,最后就发现去掉tasks.jsonargs里的"-static",问题马上就解决了,断点正常工作,就是调试的时候一开始还会闪一下&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n",不影响使用就没管他了

分享

如果这篇文章对你有帮助,欢迎分享给更多人!

VSCode gdb调试时报错
https://sijiu49.moe/posts/cpp-gdb-static_fix/
作者
肆鸠
发布于
2025-04-20
许可协议
CC BY-NC-SA 4.0

部分信息可能已经过时

目录