c++ 尝试添加配置时找不到g++生成和调试活动文件

juud5qan  于 2024-01-09  发布在  其他
关注(0)|答案(1)|浏览(341)

我在笔记本电脑上运行最新的vscode,安装了ubuntu 20.04上的.deb。C/C扩展v 1.9.7(最新)。
我在https://code.visualstudio.com/docs/cpp/config-linux中遵循了教程中的所有内容
我被困在调试中,因为我不能在launch.json中选择g
构建和调试活动文件
task.json自动生成如下

  1. {
  2. "version": "2.0.0",
  3. "tasks": [
  4. {
  5. "type": "cppbuild",
  6. "label": "C/C++: g++ build active file",
  7. "command": "/usr/bin/g++",
  8. "args": [
  9. "-fdiagnostics-color=always",
  10. "-g",
  11. "${file}",
  12. "-o",
  13. "${fileDirname}/${fileBasenameNoExtension}"
  14. ],
  15. "options": {
  16. "cwd": "${fileDirname}"
  17. },
  18. "problemMatcher": [
  19. "$gcc"
  20. ],
  21. "group": {
  22. "kind": "build",
  23. "isDefault": true
  24. },
  25. "detail": "compiler: /usr/bin/g++"
  26. }
  27. ]
  28. }

字符串
当我试图选择运行>添加配置..并选择C++(GDB/LLDB)时,我看不到“g++ build and debug active file”x1c 0d1x的下拉列表
有什么建议吗?

tcbh2hod

tcbh2hod1#

事实证明,这实际上是C/C++扩展的最新版本(1.9.7)中的一个bug。
当我将降级到v1.8.4时,添加运行配置没有问题。
x1c 0d1x的数据

相关问题