From b8c8374715ce114bdebf7d117a6b6ae03a4855fa Mon Sep 17 00:00:00 2001 From: Matthew Manela Date: Fri, 7 Jun 2024 09:11:45 -0400 Subject: [PATCH 1/2] Update VSCode launch.json to enable easier debugging --- .vscode/launch.json | 58 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index dffa3c19..73ead6a3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,14 +1,46 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Attach to Process (from list)", - "type": "go", - "request": "attach", - "mode": "local" - }, - ] -} \ No newline at end of file + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Index folder", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "cmd/zoekt-git-index", + "cwd": "${workspaceFolder}", + "args": ["${input:path}"] + }, + { + "name": "Webserver", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "cmd/zoekt-webserver", + "cwd": "${workspaceFolder}", + "args": ["-index", "${input:indexPath}"] + }, + { + "name": "Attach to Process (from list)", + "type": "go", + "request": "attach", + "mode": "local" + } + ], + "inputs": [ + { + "id": "path", + "description": "Please enter the path to the project to index", + "default": "", + "type": "promptString" + }, + { + "id": "indexPath", + "description": "Enter the path where indexes are stored", + "default": "${userHome}/.zoekt", + "type": "promptString" + } + ] +} From 50e66dd5ae01aa7e0b9ffa9de82cd97d5b29da52 Mon Sep 17 00:00:00 2001 From: Matthew Manela Date: Fri, 7 Jun 2024 10:36:47 -0400 Subject: [PATCH 2/2] Add index path --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 73ead6a3..6c254f63 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,7 +11,7 @@ "mode": "auto", "program": "cmd/zoekt-git-index", "cwd": "${workspaceFolder}", - "args": ["${input:path}"] + "args": ["-index", "${input:indexPath}", "${input:path}"] }, { "name": "Webserver",