From 2a707cf6697157a43f24d4d71a37f76fa348366c Mon Sep 17 00:00:00 2001 From: kamilritz Date: Sun, 15 Dec 2019 13:33:19 +0100 Subject: [PATCH] Debug log replays with gdb in vscode --- platforms/posix/Debug/launch.json.in | 60 ++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/platforms/posix/Debug/launch.json.in b/platforms/posix/Debug/launch.json.in index e27cea927d..6bb983cd35 100644 --- a/platforms/posix/Debug/launch.json.in +++ b/platforms/posix/Debug/launch.json.in @@ -291,5 +291,65 @@ ] } }, + { + "name": "EKF replay", + "type": "cppdbg", + "request": "launch", + "program": "${command:cmake.launchTargetPath}", + "args": [ + "${workspaceFolder}/ROMFS/px4fmu_common", + "-s", + "etc/init.d-posix/rcS", + "-t", + "${workspaceFolder}/test_data" + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}/build/px4_sitl_default/tmp", + "environment": [ + { + "name": "replay", + "value": "${input:setReplayLog}" + }, + { + "name": "replay_mode", + "value": "ekf2" + } + ], + "externalConsole": false, + "preLaunchTask": "gazebo iris", + "postDebugTask": "gazebo kill", + "linux": { + "MIMode": "gdb", + "externalConsole": false, + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "PX4 ignore wq signals", + "text": "handle SIGCONT nostop noprint nopass", + "ignoreFailures": true + } + ] + }, + "osx": { + "MIMode": "lldb", + "externalConsole": true, + "setupCommands": [ + { + "text": "pro hand -p true -s false -n false SIGCONT", + } + ] + } + }, + ], + "inputs": [ + { + "type": "promptString", + "id": "setReplayLog", + "description": "Input the path to ulog file", + } ] }