From 79d96437454226a234300553c8e89ecf7e0cd8d9 Mon Sep 17 00:00:00 2001 From: Marcin Czenko Date: Thu, 27 Nov 2025 21:22:35 +0100 Subject: [PATCH] adds launch configuration for more convenient debugging --- .vscode/launch.json | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..153cf4e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,77 @@ +{ + // 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": "Debug Current Test", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${fileDirname}", + "args": ["-test.v", "-test.run", "^${selectedText}$"], + "env": { + "CGO_ENABLED": "1" + } + }, + { + "name": "Debug Current Test Function", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${fileDirname}", + "env": { + "CGO_ENABLED": "1" + } + }, + { + "name": "Debug All Tests in Current File", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${fileDirname}", + "args": ["-test.v"], + "env": { + "CGO_ENABLED": "1" + } + }, + { + "name": "Debug All Tests in Current Package", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${fileDirname}", + "args": ["-test.v", "-count=1"], + "env": { + "CGO_ENABLED": "1" + } + }, + { + "name": "Debug Codex Tests", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}/codex", + "args": ["-test.v"], + "env": { + "CGO_ENABLED": "1" + } + }, + { + "name": "Debug Specific Test (e.g., TestUpload)", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${workspaceFolder}/codex", + "args": [ + "-test.v", + "-test.run", + "TestUpload" + ], + "env": { + "CGO_ENABLED": "1" + } + } + ] +}