microsoft / microsoft/vscode-js-debug
An error occurs when debugging an Electron application
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 373
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 6
Description
debug console output:
Debugger attached.
vite v5.4.20 building SSR bundle for development...
transforming...
✓ 112 modules transformed.
rendering chunks...
out/main/index.js 648.11 kB │ map: 1,277.67 kB
✓ built in 875ms
build the electron main process successfully
vite v5.4.20 building SSR bundle for development...
transforming...
✓ 1 modules transformed.
rendering chunks...
out/preload/index.js 1.53 kB │ map: 2.68 kB
✓ built in 11ms
build the electron preload files successfully
dev server running for the electron renderer process at:
➜ Local: http://localhost:5374/
➜ Network: use --host to expose
start electron app...
Error in the js-debug bootloader, please report to https://aka.ms/js-dbg-issue: Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:777:9)
at qa (bootloader.bundle.cdp:8:9039)
at Ba (bootloader.bundle.cdp:8:7420)
at bootloader.bundle.cdp:8:6820
at bootloader.bundle.cdp:8:7036
at Object. (bootloader.bundle.cdp:8:9229)
at Module._compile (node:internal/modules/cjs/loader:1484:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1564:10)
at Module.load (node:internal/modules/cjs/loader:1295:32)
DevTools listening on ws://127.0.0.1:9222/devtools/browser/d1b8ff3c-a3a7-4f27-aeb8-0fe500c8e1ff
[DB] initTable: OK
121212
Waiting for the debugger to disconnect...
my launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
},
"runtimeArgs": ["--sourcemap"],
"env": {
"REMOTE_DEBUGGING_PORT": "9222"
},
"outputCapture": "std"
},
{
"name": "Debug Renderer Process",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}/src/renderer",
"timeout": 60000,
}
],
"compounds": [
{
"name": "Debug All",
"configurations": ["Debug Main Process", "Debug Renderer Process"],
"presentation": {
"order": 1
}
}
]
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Electron debugging launch using the provided launch.json, then start at the js-debug bootloader failure and the Node child-process spawn EINVAL stack trace. The issue is done when the same Debug All configuration starts the main and renderer processes without the bootloader error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100