Unable to debug vscode extension
Before submitting your bug report
- [ ] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [ ] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 11
- Continue: dev branch
- IDE: VS Code 1.91.1
- Model:
- config.json:
Description
I'm trying to start debugging of the extension, checkout dev branch installed dependencies, but after launching of the extension I'm getting the error: Activating extension 'Continue.continue' failed: Could not locate the bindings file. Tried: → d:\dev\continue\extensions\vscode\out\build\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\build\Debug\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\build\Release\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\out\Debug\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\Debug\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\out\Release\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\Release\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\build\default\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\compiled\20.9.0\win32\x64\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\addon-build\release\install-root\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\addon-build\debug\install-root\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\addon-build\default\install-root\node_sqlite3.node → d:\dev\continue\extensions\vscode\out\lib\binding\node-v121-win32-x64\node_sqlite3.node.
To reproduce
- checkout dev branch
- Open the VS Code command pallet (cmd/ctrl+shift+p) and select Tasks: Run Task and then select install-all-dependencies
- Start debugging
Log output
No response
and sometimes I'm getting another error Activating extension 'Continue.continue' failed: Cannot find module 'd:\dev\continue\extensions\vscode\out\extension.js' Require stack:
- c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-fork.js.
and sometimes I'm getting another error Activating extension 'Continue.continue' failed: Cannot find module 'd:\dev\continue\extensions\vscode\out\extension.js' Require stack:
- c:\Program Files\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Program Files\Microsoft VS Code\resources\app\out\bootstrap-fork.js.
Same here for the latest main branch code! This tells that the extension is not compiled successfully due to some reasons. Have you solved it?
me too how to solve it
You can fix it by deleting the extensions/vscode/out folder and retrying
I have successfully run it in VSCode, here are my commands, I am not sure whether there is a doc section including this, but hope it gives someone a hand:
How to run Continue VSCode
cd core
npm i
cd ..
cd binary
npm i
npm run build
cd ..
cd gui
npm i
npm run build
cd ..
cd extensions/vscode
npm i
npm run prepackage
ollama list
ollama run llama3.1:8b
ollama run gemma2:2b
ollama run starcoder2:3b
ollama pull nomic-embed-text
# Open extension.ts in VSCode
F5
Same Issue: after installing all dependencies I try to run Continue via vscode debugger but it fails. vscode-extension:continue-ui:build task fails trying to remove:
-
[info] Error removing unused binaries Error: EPERM: operation not permitted, unlink 'C:\Users\snappy\http\continue\extensions\vscode\bin\napi-v3\darwin\arm64\libonnxruntime.1.14.0.dylib'
-
Error: EPERM: operation not permitted, unlink 'C:\Users\snappy\http\continue\extensions\vscode\node_modules@esbuild\win32-x64\esbuild.exe'
-
OS: Windows 11
-
IDE: VS Code 1.92
@Symbolk tried your solution but did not worked for me.
@Symbolk I tried your solution of running npm commands does not solve the issue, I ran extensions\vscode\src\extension.ts file using F5, it gave me following error
Activating extension 'Continue.continue' failed: Cannot find module 'c:\ProjectFolder\continue-main\extensions\vscode\out\extension.js' Require stack: - c:\Users\User1\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js - c:\Users\User1\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js - c:\Users\User1\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js.
Same Issue: after installing all dependencies I try to run Continue via vscode debugger but it fails. vscode-extension:continue-ui:build task fails trying to remove:
- [info] Error removing unused binaries Error: EPERM: operation not permitted, unlink 'C:\Users\snappy\http\continue\extensions\vscode\bin\napi-v3\darwin\arm64\libonnxruntime.1.14.0.dylib'
- Error: EPERM: operation not permitted, unlink 'C:\Users\snappy\http\continue\extensions\vscode\node_modules@esbuild\win32-x64\esbuild.exe'
- OS: Windows 11
- IDE: VS Code 1.92
Tested on different machines with same result.
This is on branch v0.8.50-vscode
* Executing task: node C:\Users\alros\http\continue/extensions/vscode/scripts/prepackage.js
[info] Using target: win32-x64
[info] Packaging extension for target win32-x64
[info] npm install in extensions/vscode completed
[info] npm install in gui completed
[info] Copied gui build to JetBrains extension
Copied gui build to VSCode extension
[info] Copied onnxruntime-node
[info] Copied tree-sitter.wasm
[info] Copied llamaTokenizerWorkerPool.mjs
[info] Copied llamaTokenizer.mjs
[info] Copied tiktokenWorkerPool.mjs
npm installing esbuild binary
Copying [email protected] to @esbuild
node:fs:1878
binding.unlink(path);
^
Error: EPERM: operation not permitted, unlink 'C:\Users\alros\http\continue\extensions\vscode\node_modules\@esbuild\win32-x64\esbuild.exe'
at unlinkSync (node:fs:1878:11)
at C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\fix-eperm.js:52:20
at method (C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\retry-busy.js:50:24)
at C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\rimraf-windows.js:154:56
at ignoreENOENTSync (C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\ignore-enoent.js:12:16)
at rimrafWindowsDirSync (C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\rimraf-windows.js:154:49)
at rimrafWindowsDirSync (C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\rimraf-windows.js:161:22)
at rimrafWindowsDirSync (C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\rimraf-windows.js:161:22)
at rimrafWindowsSync (C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\rimraf-windows.js:82:16)
at C:\Users\alros\http\continue\extensions\vscode\node_modules\rimraf\dist\commonjs\index.js:59:47 {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'C:\\Users\\alros\\http\\continue\\extensions\\vscode\\node_modules\\@esbuild\\win32-x64\\esbuild.exe'
}
Node.js v20.11.0
syscall: 'unlink'
You seem to have permission error. I see your syscall is "unlink." I had to run the command npm config set script-shell cmd for mine to install. Also weirdly enough I had to uninstall the esbuild using the script/uninstall.js. then reinstalling again. Super hacky but it worked.
D:\develop\nodejs\node.exe .\out\index.js
Process exited with code 1
Uncaught Error Error: Could not locate the bindings file. Tried:
→ D:\develop_llm\vscode_proj\continue-main\binary\build\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\build\Debug\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\build\Release\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\out\Debug\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\Debug\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\out\Release\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\Release\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\build\default\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\compiled\20.11.0\win32\x64\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\addon-build\release\install-root\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\addon-build\debug\install-root\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\addon-build\default\install-root\node_sqlite3.node
→ D:\develop_llm\vscode_proj\continue-main\binary\lib\binding\node-v115-win32-x64\node_sqlite3.node
at bindings (d:\develop_llm\vscode_proj\continue-main\core\node_modules\bindings\bindings.js:126:9)
at ../core/node_modules/sqlite3/lib/sqlite3-binding.js (d:\develop_llm\vscode_proj\continue-main\core\node_modules\sqlite3\lib\sqlite3-binding.js:1:18)
at __require (d:\develop_llm\vscode_proj\continue-main\binary\out\index.js:18:51)
at ../core/node_modules/sqlite3/lib/sqlite3.js (d:\develop_llm\vscode_proj\continue-main\core\node_modules\sqlite3\lib\sqlite3.js:2:17)
at __require (d:\develop_llm\vscode_proj\continue-main\binary\out\index.js:18:51)
at
same question,tried but still not working. im sure there can be problem in npm install or building
npm: 10.8.3 node: 20.17.0 vscode: 1.9.3
Activating extension 'Continue.continue' failed: Could not locate the bindings file. Tried: → d:\job\vscodeExtend\continue-main\extensions\vscode\out\build\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\build\Debug\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\build\Release\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\out\Debug\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\Debug\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\out\Release\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\Release\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\build\default\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\compiled\20.15.1\win32\x64\node_sqlite3.node → d:\job\vscodeExtend\continue-main\extensions\vscode\out\addon-build\release\install-root\node_sqlite3.n...
@sestinj any suggestions? seems like the debugger script for windows fail when removing the esbuild files on the prepackage.js. it complains on permissions to unlink the generated files on the prepackaging. When installing it fails too but it doesn't stops the process, on the debugger the unlink permission makes the process fail.
I'm using Windows 10 and encountered the same issues ("PERM unlink" and "Cannot find module 'd:\dev\continue\extensions\vscode\out\extension.js'"). I figured out that this problem occurs because VS Code doesn't have permission to run the vscode-extension:continue-ui:build task. I haven't found a proper way to fix these issues yet. However, if you still want to be in debug mode, here are my steps:
- Close all vscode windows and run
node ${workspaceFolder}/extensions/vscode/scripts/prepackage.json terminal. - Open VScode and comment line 11 in ".vscode/tasks.json"
- Launch extension as in the docs mentioned.
@heiung2001 Thanks! at least that helps, I moved to a Linux and there i can run the debugger perfectly. This will help at least test run on windows until there is a fix.
I think Windows users mostly experience this issue. I recommend installing Ubuntu via WSL2. Once set up, you can work with the repository in one of the following ways:
- Mount the repository folder from Windows into Ubuntu and launch it in VS Code.
- Clone the repository directly in Ubuntu.
After setting up the repository, follow the instructions in the CONTRIBUTING.md file to configure your environment and launch the extension.
If you run into errors while installing dependencies for the extension when mounting the Windows repository to Ubuntu, here's a quick fix:
- Change the End of Line Sequence for the workspace from CRLF to LF. This will allow you to run your
install_dependencies.shwithout issues.
@DevangPagare002 Thanks for sharing the workflow. Sadly a work around is not an option since it will be ideal to just debug on windows.
When running the debugger from Linux connected via remote-ssh on windows the prepackage script is for Linux so you get an sqlite architecture error.
I am working full on Linux for now and works great, same for mac, is just the prepackage script + the esbuilder being sideloaded and installed with a different permissions that the rest of the node_modules. I am no windows expert so I just open an issue.
For everyone experiencing the Error: EPERM: operation not permitted, unlink 'C:\Users\alros\http\continue\extensions\vscode\node_modules\@esbuild\win32-x64\esbuild.exe' error, I've just pushed a solution to the dev branch: https://github.com/continuedev/continue/commit/e0ddfeea8472db56aa96c18b33aa1664928f58dc
The problem here was that we are running esbuild in watch mode while trying to remove that folder. By having the esbuild-watch task depend on the prepackage task to finish, this conflict won't occur.
There's still a secondary issue though, which was the original
Activating extension 'Continue.continue' failed: Could not locate the bindings file. Tried:
→ d:\dev\continue\extensions\vscode\out\build\node_sqlite3.node
This seems to be more of a timing problem than anything else, as I've been able to confirm on my own windows machine that the node_sqlite3.node file is correctly downloaded to the out/build/Release folder. Probably in the worst case you will have to "Reload window" when you get this the first time.
If it's still causing major headaches, perhaps we can add some kind of timeout to make sure it is fully downloaded
I got another issue on mac:
Activating extension 'Continue.continue' failed: Request constructor: Expected init.body ("<ref *1> h [ReadableStream] { _state: 'readable', _reader: undefined, _storedError: undefined, _disturbed: false, _readableStreamController: h [ReadableStreamDefaultController] { _controlledReadableStream: [Circular *1], _queue: h { _cursor: 0, _size: 0, _front: [Object], _back: [Object] }, _queueTotalSize: 0, _started: false, _closeRequested: false, _pullAgain: false, _pulling: false, _strategySizeAlgorithm: [Function (anonymous)], _strategyHWM: 1, _pullAlgorithm: [Function (anonymous)], _cancelAlgorithm: [Function (anonymous)] } }") to be an instance of ReadableStream..
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!