launch.json 4.0 KB

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