Description
When using the node adapter after reinstalling js-debug, the debugger fails with a module not found error for the bootloader.js file, pointing to an old installation path.
Steps to Reproduce
- Install js-debug adapter:
debug-run install-adapter node
- Move or reinstall debug-run to a different location
- Reinstall js-debug:
rm -rf bin/adapters/js-debug && debug-run install-adapter node
- Run a debug session:
debug-run samples/typescript/dist/index.js -a node -b "samples/typescript/src/index.ts:177"
Expected Behavior
The debug session should start and hit breakpoints.
Actual Behavior
The session fails with:
Error: Cannot find module '/old/path/to/bin/adapters/js-debug/src/bootloader.js'
The error references the previous installation path, not the current one.
Root Cause
The js-debug adapter appears to embed the absolute path to its bootloader.js during extraction/installation. When the adapter is reinstalled to a different location, the embedded path remains stale.
Environment
- debug-run version: 0.5.6
- js-debug version: 1.105.0
- Node.js: v24.5.0
- OS: macOS (darwin arm64)
Workaround
Currently unknown - the path seems to be embedded in the minified js-debug bundle in a way that survives reinstallation.
Possible Solutions
- Investigate if js-debug has a configuration option to override the bootloader path
- Consider if the bootloader path is set via environment variable during launch
- Build js-debug from source with correct paths
Description
When using the node adapter after reinstalling js-debug, the debugger fails with a module not found error for the bootloader.js file, pointing to an old installation path.
Steps to Reproduce
debug-run install-adapter noderm -rf bin/adapters/js-debug && debug-run install-adapter nodedebug-run samples/typescript/dist/index.js -a node -b "samples/typescript/src/index.ts:177"Expected Behavior
The debug session should start and hit breakpoints.
Actual Behavior
The session fails with:
The error references the previous installation path, not the current one.
Root Cause
The js-debug adapter appears to embed the absolute path to its bootloader.js during extraction/installation. When the adapter is reinstalled to a different location, the embedded path remains stale.
Environment
Workaround
Currently unknown - the path seems to be embedded in the minified js-debug bundle in a way that survives reinstallation.
Possible Solutions