launch.json 1.3 KB

123456789101112131415161718192021222324252627282930
  1. {
  2. // Use IntelliSense to learn about possible attributes.
  3. // Hover to view descriptions of existing attributes.
  4. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "configurations": [
  7. {
  8. "name": "(gdb) Launch",
  9. "preLaunchTask": "g++.exe build active file",//调试前执行的任务,就是之前配置的tasks.json中的label字段
  10. "type": "cppdbg",//配置类型,只能为cppdbg
  11. "request": "launch",//请求配置类型,可以为launch(启动)或attach(附加)
  12. "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",//调试程序的路径名称
  13. "args": [],//调试传递参数
  14. "stopAtEntry": false,
  15. "cwd": "${workspaceFolder}",
  16. "environment": [],
  17. "externalConsole": true,//true显示外置的控制台窗口,false显示内置终端
  18. "MIMode": "gdb",
  19. "miDebuggerPath": "D:\\mingw-w64\\mingw64\\bin\\gdb.exe",
  20. "setupCommands": [
  21. {
  22. "description": "Enable pretty-printing for gdb",
  23. "text": "-enable-pretty-printing",
  24. "ignoreFailures": true
  25. }
  26. ]
  27. }
  28. ]
  29. }