0
我在OSX上有一個最小的Electron應用程序設置,通過命令行運行時工作正常,但我無法使用Visual Studio代碼在調試模式下運行:Electron/VSCode:無法連接到運行時進程,10000 ms後超時 - (ECONNREFUSED)
Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:13207).
我launch.json文件看起來像:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/main.js",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"runtimeArgs": [
".",
"--enable-logging"
],
"env": {},
"console": "internalConsole",
"sourceMaps": false
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
}
]
}
任何幫助將非常感激。
查看[調試主進程](https://github.com/electron/electron/blob/master/docs/tutorial/debugging-main-process.md) – RoyalBingBong
添加「協議」:「傳統」配置 – JerryGoyal