launch.json 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {
  2. // 使用 IntelliSense 了解相关属性。
  3. // 悬停以查看现有属性的描述。
  4. // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "configurations": [
  7. {
  8. "name": "(gdb) 启动",
  9. "type": "cppdbg",
  10. "request": "launch",
  11. "program": "${workspaceFolder}\\tools\\bin\\${fileBasenameNoExtension}.exe",
  12. "args": ["${workspaceFolder}\\tools\\testcases\\config.json"],
  13. "stopAtEntry": true,
  14. "cwd": "${fileDirname}",
  15. "environment": [],
  16. "externalConsole": true,
  17. "MIMode": "gdb",
  18. "miDebuggerPath": "gdb.exe",
  19. "setupCommands": [
  20. {
  21. "description": "为 gdb 启用整齐打印",
  22. "text": "-enable-pretty-printing",
  23. "ignoreFailures": true
  24. },
  25. {
  26. "description": "将反汇编风格设置为 Intel",
  27. "text": "-gdb-set disassembly-flavor intel",
  28. "ignoreFailures": true
  29. }
  30. ],
  31. "preLaunchTask": "C/C++: gcc.exe build active file" // 调试前的预执行任务,这里的值是tasks.json文件中对应的编译任务,也就是调试前需要先编译
  32. }
  33. ]
  34. }