VScode for c++

今天药忘吃喽~ 2023-03-13 03:57 75阅读 0赞

VScode for c++

VScode for c++

launch.json

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "(gdb) Launch",
  6. "type": "cppdbg",
  7. "request": "launch",
  8. "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
  9. "args": [],
  10. "stopAtEntry": false,
  11. "cwd": "${workspaceRoot}",
  12. "environment": [],
  13. "externalConsole": true,
  14. "MIMode": "gdb",
  15. "miDebuggerPath": "gdb.exe",
  16. "setupCommands": [
  17. {
  18. "description": "Enable pretty-printing for gdb",
  19. "text": "-enable-pretty-printing",
  20. "ignoreFailures": true
  21. }
  22. ]
  23. }
  24. ]
  25. }

tasks.json
${fileDirname}\${fileBasenameNoExtension}.exe 不能是中文

  1. {
  2. // See https://go.microsoft.com/fwlink/?LinkId=733558
  3. // for the documentation about the tasks.json format
  4. "version": "2.0.0",
  5. "tasks": [
  6. {
  7. "type": "shell",
  8. "label": "g++", //这里注意一下,见下文
  9. "command": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-sjlj-rt_v6-rev0\\mingw64\\bin\\g++.exe",
  10. "args": [
  11. "-std=c++11",
  12. "-g",
  13. "${file}",
  14. "-o",
  15. "${fileDirname}\\${fileBasenameNoExtension}.exe"
  16. ],
  17. "options": {
  18. "cwd": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-sjlj-rt_v6-rev0\\mingw64\\bin"
  19. },
  20. "problemMatcher": [
  21. "$gcc"
  22. ],
  23. "group": {
  24. "kind": "build",
  25. "isDefault": true
  26. },
  27. }
  28. ]
  29. }

发表评论

表情:
评论列表 (有 0 条评论,75人围观)

还没有评论,来说两句吧...

相关阅读