microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
271 stars 77 forks source link

VSCode can't find module @vscode/debugadapter #258

Closed theIDinside closed 2 years ago

theIDinside commented 2 years ago

I'm currently writing a debug adapter implementation, and this is the problem I'm faced with;

The application works when running in an extension host (i.e. debugging the extension) but when I go to package it, it failed. And it fails silently, which is even worse, but when I toggle developer tools; I can see that it can not find the module.

Activating extension '******* failed: Cannot find module 'vscode-debugadapter'
Require stack:
- /home/***/.vscode/extensions/*****/modules/debugSession.js
- /home/***/.vscode/extensions/*****/modules/activateDebuggerExtension.js
- /home/***/.vscode/extensions/*****/extension.js
- /snap/code/85/usr/share/code/resources/app/out/vs/loader.js
- /snap/code/85/usr/share/code/resources/app/out/bootstrap-amd.js
- /snap/code/85/usr/share/code/resources/app/out/bootstrap-fork.js.

This particular message shows vscode-debugadapter but the same errors is displayed in developer tools, when using the newer @vscode/debugadapter (and in fact, the most up-to-date uses this new one)

The extension is a purely Javascript one. Is there an issue with using this module in pure javascript? Because it makes sense that the extension works when running an extension host / debugging the extension - because then it can obviously just peek into the node_modules of the workspaceFolder it "came from" - but when packaging it, it can't be found when having installed the VSIX.

As there is no documentation, anywhere to be found about this, is this an error or am I using the npm modules wrong?