From e28d1334e9ef666bb238f2303ada100eca8d3f21 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 17 May 2022 22:14:24 +1000 Subject: [PATCH] better debug setup --- .vscode/debugger_config.yml | 1 + .vscode/launch.json | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .vscode/debugger_config.yml diff --git a/.vscode/debugger_config.yml b/.vscode/debugger_config.yml new file mode 100644 index 000000000..dc8bd1faa --- /dev/null +++ b/.vscode/debugger_config.yml @@ -0,0 +1 @@ +disableStartupPopups: true diff --git a/.vscode/launch.json b/.vscode/launch.json index d65563396..a39309429 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,13 +2,35 @@ "version": "0.2.0", "configurations": [ { - "name": "debug lazygit", + "name": "Debug Lazygit", "type": "go", "request": "launch", "mode": "auto", "program": "main.go", - "args": ["--debug"], - "console": "integratedTerminal" // <-- you need this to actually see the lazygit UI in a window while debugging + "args": ["--debug", "--use-config-file=.vscode/debugger_config.yml"], + "console": "integratedTerminal", + "presentation": { + "hidden": true + } + }, + { + "name": "Tail Lazygit logs", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "main.go", + "args": ["--logs", "--use-config-file=.vscode/debugger_config.yml"], + "console": "integratedTerminal", + "presentation": { + "hidden": true + } + } + ], + "compounds": [ + { + "name": "Run with logs", + "configurations": ["Tail Lazygit logs", "Debug Lazygit"], + "stopAll": true } ] }