tasks.json 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {
  2. "tasks": [
  3. {
  4. "type": "shell",
  5. // 此处type的属性问题下面详说
  6. "label": "C/C++: g++ build active file",
  7. "command": "/usr/bin/g++",
  8. "presentation": {
  9. "echo": true,
  10. "reveal": "always",
  11. "focus": false,
  12. "panel": "shared",
  13. "showReuseMessage": true,
  14. "clear": false
  15. },
  16. "args": [
  17. "-g",
  18. "${file}",
  19. "-std=c++17",
  20. "-o",
  21. "${workspaceRoot}/out/${fileBasenameNoExtension}"
  22. ],
  23. // 此处与launch.json中类似,若不需要则删去 /out
  24. "options": {
  25. "cwd": "${workspaceFolder}"
  26. },
  27. "problemMatcher": [
  28. "$gcc"
  29. ],
  30. "group": {
  31. "kind": "build",
  32. "isDefault": true
  33. },
  34. "detail": "Task generated by Debugger."
  35. }
  36. ],
  37. "version": "2.0.0"
  38. }