From e56511bd14dfc8ae2c200f14015f64e7ea845877 Mon Sep 17 00:00:00 2001 From: Thomas A Date: Tue, 28 Mar 2023 11:37:22 -0700 Subject: [PATCH] Add Configuration To Load Core Dumps In VSCode Debugger --- .vscode/launch.json | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c794938b8..276308a90 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,8 +9,31 @@ "request": "launch", "name": "Debug darling-coredump", "program": "${workspaceFolder}/build/src/hosttools/darling-coredump", - "args": ["core_dump"], + "args": ["${input:linuxCoreDumpFileName}"], "cwd": "${workspaceFolder}" + }, + // Based on https://stackoverflow.com/a/57848966 + { + "type": "lldb", + "request": "custom", + "name": "Open Darling Core Dump", + "initCommands": [ + "target create -c ${input:convertedCoreDumpFileName}" + ] + } + ], + "inputs": [ + { + "id": "linuxCoreDumpFileName", + "type": "promptString", + "description": "Enter the path to the core dump that needs to be converted", + "default": "" + }, + { + "id": "convertedCoreDumpFileName", + "type": "promptString", + "description": "Enter the path to the Darling core dump", + "default": "" } ] } \ No newline at end of file