Closed JustinGrote closed 7 months ago
Same problem for me.
Version: 1.85.1 (user setup) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:49:37.021Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045
@JustinGrote @reduckted
Did you find any workaround for debugging using this cli ?
import { defineConfig } from '@vscode/test-cli';
export default defineConfig([{
label: 'Workspace_1',
workspaceFolder: './src/test/integration/workspace_1',
files: 'out/test/integration/*/.test.js',
mocha: {
preload: "ts-node/register",
}
}]);
---
### Attempts
Create a configuration inside launch.json to execute the cli.
* Execute the tests: :heavy_check_mark:
* Debugging available: :negative_squared_cross_mark:
{
"name": "Integration tests with vscode-test cli program",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/@vscode/test-cli/out/bin.mjs",
"args": [
"--label",
"Workspace_1"
],
"console": "integratedTerminal"
}
---
### Workaround
My current workaround is to use a custom runner. But the goal of this cli is to provide an easier method.
CF: https://code.visualstudio.com/api/working-with-extensions/testing-extension#advanced-setup-your-own-runner
```json
{
"name": "Integration tests with custom runner",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test/integration" ],
"outFiles": [ "${workspaceRoot}/out/test/integration/**/*.js" ],
"preLaunchTask": "${defaultBuildTask}"
}
Did you find any workaround for debugging using this cli ?
No, unfortunately not.
FYI looks like this was fixed and will be usable in the next build. https://github.com/microsoft/vscode-test-cli/pull/15#issuecomment-1989465139
It was released to stable last week.
https://github.com/microsoft/vscode-test-cli/blob/main/README.md#debugging
States you can make a launch config with a
TestConfiguration
parameter to specify a test and have this launch a extensionhost test similar to what vscode-test does. This does not seem to work at all, it launches a window but nothing gets triggered or started andTestConfiguration
is reported as an unknown parameter. I tried in Insiders too. Is this something that is TBD or maybe was abandoned?No such parameter exists in the vscode-js-debug options for ExtensionHost debugging: https://github.com/microsoft/vscode-js-debug/blob/main/OPTIONS.md