cursorless
cursorless copied to clipboard
neovim: `Neovim: Test` launch command doesn't auto attach to neovim node process on Linux
Currently the documentation for running and testing the extension states:
## Running / testing extension locally
In order to test out your local version of the extension or to run unit tests locally, you need to run the extension in
debug mode. To do so you need to run the `workbench.action.debug.selectandstart` (aka `Debug: Select and Start Debugging`) command in VSCode and then select either "Neovim: Run" or "Neovim: Test".
The debug logs are written in `C:\path\to\cursorless\packages\cursorless-neovim\out\nvim_node.log`.
On Linux when I run "Neovim: Test" it spawns a shell with the new neovim instance and then just hangs. This in turn leads bug #2445 . The solution is to manually tell VSCode to attach to the node process, at which point the tests will actually be able to run, and nvim_node.log is populated.
The launch.json file contains:
{
"name": "Neovim: Test",
"request": "attach",
"continueOnAttach": true,
"skipFiles": ["<node_internals>/**"],
"preLaunchTask": "Neovim: Build extension and tests",
"type": "node"
},
but it seems like this attach doesn't actually auto attach. The debug-neovim.sh script explicitly sets export NVIM_NODE_HOST_DEBUG="1", so it is waiting for something to attach.