We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/debugmcpdev/mcp-debugger'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
javascript-debugging-fix-summary.md•1.44 kB
# JavaScript Debugging Fix Summary
## Issues Identified and Fixed
### Issue 1: Event Handler Bug
The `performHandshake` function in `JsDebugAdapterPolicy` had a bug in the event handler that waits for the DAP 'initialized' event. It was comparing an event object directly to a string instead of checking the event's property.
**Fix Applied:** Updated event handler to handle both string and object formats.
### Issue 2: Node.js Binary Not Found (ACTUAL ROOT CAUSE)
The js-debug adapter couldn't find the Node.js binary. The error message was:
```
Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH
```
**Fix Applied:** Changed the launch configuration to use `process.execPath` (the full path to the Node.js executable) instead of just "node":
```javascript
runtimeExecutable: process.execPath // Uses the same Node.js that's running the MCP server
```
## Files Modified
- `packages/shared/src/interfaces/adapter-policy-js.ts`
- Fixed event handler in performHandshake
- Added `runtimeExecutable: process.execPath` to launch configuration
## Testing Status
- ✅ Python debugging confirmed working
- ✅ Both fixes applied and built successfully
- ⏳ **Action Required**: Restart the MCP server to test JavaScript debugging
## Next Steps
1. Restart the MCP server to load the fixed code
2. Test JavaScript debugging to confirm it works
3. Commit the changes if successful