chore: fix prompt in launch config to test current file (#7791)

Previous launch config no longer works, either related to vs code update
or extension update, but changing prompt input to use
`extension.commandvariable` specific command does the job.

Also fixes segfault issue by changing from `threads` to `forks`.
This commit is contained in:
Nico Flaig
2025-05-08 10:59:40 +01:00
committed by GitHub
parent 4a9c1b124b
commit 6dae670fba
2 changed files with 9 additions and 5 deletions

View File

@@ -49,8 +49,8 @@
"-t",
"${input:testName}",
"--pool",
"threads",
"--poolOptions.threads.singleThread"
"forks",
"--poolOptions.forks.singleFork"
],
"cwd": "${workspaceFolder}/${input:packageName}",
"console": "integratedTerminal",
@@ -72,8 +72,12 @@
},
{
"id": "testName",
"type": "promptString",
"description": "Enter the test name to run, leave empty to run all"
"type": "command",
"command": "extension.commandvariable.promptStringRemember",
"args": {
"key": "testName",
"description": "Enter the test name to run, leave empty to run all"
}
}
]
}

View File

@@ -6,7 +6,7 @@ This page describes different approaches for debugging Lodestar.
The simplest way to debug is to use the provided [launch.template.json](https://github.com/ChainSafe/lodestar/blob/unstable/.vscode/launch.template.json) `configurations`. Copy them as `.vscode/launch.json` and they will be made available in the `Run and Debug` section in VS Code. Adapt as needed, e.g. by adding additional arguments to the beacon [configuration](https://github.com/ChainSafe/lodestar/blob/unstable/.vscode/launch.template.json#L22) to match your needs.
VS Code supports debugging Workers out of the box when using those configurations.
VS Code supports debugging Workers out of the box when using those configurations. The `Test Current File` launch configuration additionally requires to install [Command Variable](https://marketplace.visualstudio.com/items/?itemName=rioj7.command-variable) extension to correctly parse input prompts.
## Attach to running process