chore: add shared vscode launch config (#20103)

This commit is contained in:
Trevor Whitney
2025-12-05 07:20:56 -07:00
committed by GitHub
parent 9bd5d6a7d0
commit 8156f809e3
3 changed files with 80 additions and 4 deletions

1
.gitignore vendored
View File

@@ -53,6 +53,7 @@ _shared-workflows-dockerhub-login
# vscode
.vscode
!.vscode/launch.json
# nix
nix/result

76
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,76 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Specified Test",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${fileDirname}",
"args": [
"-test.run",
"^${input:testName}$"
],
"showLog": true,
"trace": "verbose"
},
{
"name": "Attach to Process",
"type": "go",
"request": "attach",
"mode": "local",
"processId": "${command:pickProcess}"
},
{
"name": "Debug Loki",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/loki",
"args": [
"-config.file=${workspaceFolder}/cmd/loki/loki-local-config.yaml"
],
"showLog": true
},
{
"name": "Debug Loki (Custom Config)",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/loki",
"args": [
"-config.file=${input:configFile}"
],
"showLog": true
},
{
"name": "Debug Remote Process (dlv connect)",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "${workspaceFolder}",
"port": "${input:port}",
"host": "localhost"
}
],
"inputs": [
{
"id": "configFile",
"type": "promptString",
"description": "Path to Loki config file",
"default": "${workspaceFolder}/cmd/loki/loki-local-config.yaml"
},
{
"id": "testName",
"type": "promptString",
"description": "Test name to run"
},
{
"id": "port",
"type": "promptString",
"description": "Port to connect to",
"default": 18001
}
]
}

View File

@@ -78,10 +78,9 @@ storage_config:
filesystem:
dir: ${PWD}/pkg/logql/bench/data/storage
querier:
engine_v2:
enable: true
batch_size: 8192
query_engine:
enable: true
batch_size: 8192
query_range:
cache_results: false