当前位置:   article > 正文

Linux下使用vsCode调试C/C++【json文件配置】_linux vscode ccppproperties.json

linux vscode ccppproperties.json

使用vsCode学习SLAM编程,最近在看高翔博士的十四讲,他用的Kdevelop我用不惯,但是自己又不会配置vscode,查了点资料,现将三个配置文件的内容汇总如下:
 

# c_cpp_properties.json

  1. {
  2. "configurations": [
  3. {
  4. "name": "Linux",
  5. "includePath": [
  6. "${workspaceFolder}/**",
  7. "/usr/include/eigen3"
  8. ],
  9. "defines": [],
  10. "compilerPath": "/usr/bin/clang-9",
  11. "cStandard": "c17",
  12. "cppStandard": "c++14",
  13. "intelliSenseMode": "linux-clang-x64"
  14. }
  15. ],
  16. "version": 4
  17. }

# launch.json

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "g++ - 生成和调试活动文件",
  6. "type": "cppdbg",
  7. "request": "launch",
  8. "program": "${workspaceFolder}/build/mycmake_exe",
  9. "args": [],
  10. "stopAtEntry": false,
  11. "cwd": "${workspaceFolder}",
  12. "environment": [],
  13. "externalConsole": false,
  14. "MIMode": "gdb",
  15. "miDebuggerPath": "/usr/bin/gdb",
  16. "preLaunchTask": "build"
  17. }
  18. ]
  19. }

# tasks.json

  1. {
  2. "version": "2.0.0",
  3. "options": {"cwd": "${workspaceFolder}/build"},
  4. "tasks": [
  5. {
  6. "type": "shell",
  7. "label": "cmake",
  8. "command": "cmake",
  9. "args": [
  10. ".."
  11. ]
  12. },
  13. {
  14. "label": "make",
  15. "command": "make",
  16. },
  17. {
  18. "label": "build",
  19. "dependsOrder": "sequence",
  20. "dependsOn":[
  21. "cmake",
  22. "make"
  23. ],
  24. }
  25. ]
  26. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/代码探险家/article/detail/924002
推荐阅读
相关标签
  

闽ICP备14008679号