launch.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "调试轮椅状态机",
  6. "type": "cppdbg",
  7. "request": "launch",
  8. "program": "${workspaceFolder}/build/wheelchair_state_machine/wheelchair_state_machine_node",
  9. "args": [],
  10. "stopAtEntry": false,
  11. "cwd": "${workspaceFolder}",
  12. "environment": [],
  13. "externalConsole": false,
  14. "MIMode": "gdb",
  15. "miDebuggerPath": "/usr/bin/gdb",
  16. "setupCommands": [
  17. {
  18. "description": "启用GDB整齐打印",
  19. "text": "-enable-pretty-printing",
  20. "ignoreFailures": true
  21. },
  22. {
  23. "description": "设置GDB在进入没有调试信息的函数时自动跳过",
  24. "text": "set step-mode off",
  25. "ignoreFailures": true
  26. },
  27. {
  28. "description": "禁用源文件查找错误提示",
  29. "text": "set source open off",
  30. "ignoreFailures": true
  31. },
  32. {
  33. "description": "设置反汇编风格",
  34. "text": "-gdb-set disassembly-flavor intel",
  35. "ignoreFailures": true
  36. },
  37. {
  38. "description": "设置当找不到源文件时继续执行",
  39. "text": "set print source-filename off",
  40. "ignoreFailures": true
  41. }
  42. ],
  43. "preLaunchTask": "编译轮椅状态机",
  44. "postDebugTask": "",
  45. "logging": {
  46. "engineLogging": false,
  47. "programOutput": true,
  48. "exceptions": true,
  49. "moduleLoad": false,
  50. "trace": false
  51. },
  52. "sourceFileMap": {
  53. "/workspace": "${workspaceFolder}",
  54. "/home/ros2_ws/src": "${workspaceFolder}"
  55. }
  56. },
  57. {
  58. "name": "带参数调试",
  59. "type": "cppdbg",
  60. "request": "launch",
  61. "program": "${workspaceFolder}/build/wheelchair_state_machine/wheelchair_state_machine_node",
  62. "args": [
  63. "--ros-args",
  64. "-p",
  65. "low_battery_threshold:=25.0",
  66. "-p",
  67. "critical_battery_threshold:=15.0",
  68. "-p",
  69. "distance_threshold:=0.6",
  70. "-p",
  71. "fit_window_size:=15"
  72. ],
  73. "stopAtEntry": false,
  74. "cwd": "${workspaceFolder}",
  75. "environment": [],
  76. "externalConsole": false,
  77. "MIMode": "gdb",
  78. "miDebuggerPath": "/usr/bin/gdb",
  79. "setupCommands": [
  80. {
  81. "description": "启用GDB整齐打印",
  82. "text": "-enable-pretty-printing",
  83. "ignoreFailures": true
  84. },
  85. {
  86. "description": "设置跳过无调试信息的函数",
  87. "text": "set step-mode off",
  88. "ignoreFailures": true
  89. }
  90. ],
  91. "preLaunchTask": "编译轮椅状态机"
  92. },
  93. {
  94. "name": "附加到运行进程",
  95. "type": "cppdbg",
  96. "request": "attach",
  97. "program": "${workspaceFolder}/build/wheelchair_state_machine/wheelchair_state_machine_node",
  98. "processId": "${command:pickProcess}",
  99. "MIMode": "gdb",
  100. "setupCommands": [
  101. {
  102. "description": "启用GDB整齐打印",
  103. "text": "-enable-pretty-printing",
  104. "ignoreFailures": true
  105. }
  106. ]
  107. }
  108. ]
  109. }