From 28d12e4e5d72f087d23544de44b2af87d59bab95 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 9 Sep 2023 14:00:48 +0200 Subject: [PATCH] Add debug configuration to attach to a running lazygit process I often find it more convenient to start a lazygit process in a terminal window and then attach to it, rather than have VS Code launch one for me. Note that this doesn't work with "go run main.go". It does work with "make run", however. Make sure there's only one lazygit process running, otherwise VS Code will open a chooser with all the running processes to pick one from, but it's pretty much impossible to tell which is which. --- .vscode/launch.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 26d682ff6..df6e0ce80 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -32,6 +32,15 @@ "hidden": true } }, + { + "name": "Attach to a running Lazygit", + "type": "go", + "request": "attach", + "mode": "local", + "processId": "lazygit", + "hideSystemGoroutines": true, + "console": "integratedTerminal", + }, ], "compounds": [ {