Skip to content

js-debug adapter fails with stale bootloader.js path after reinstall #2

@Chris-Cullins

Description

@Chris-Cullins

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

  1. Install js-debug adapter: debug-run install-adapter node
  2. Move or reinstall debug-run to a different location
  3. Reinstall js-debug: rm -rf bin/adapters/js-debug && debug-run install-adapter node
  4. 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

  1. Investigate if js-debug has a configuration option to override the bootloader path
  2. Consider if the bootloader path is set via environment variable during launch
  3. Build js-debug from source with correct paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions