我试图在Mac上做同样的事情.我和上面一样,除了代替
"runtimeExecutable":"node_modules/electron-prebuilt/dist/electron.exe"我把它作为
"runtimeExecutable":"/ usr/local/bin/electron"由于mac上的F5映射到屏幕调光器,我从命令行启动了应用程序,如下所示:
electron --debug-brk=5858 .
Run Code Online (Sandbox Code Playgroud)
我的程序启动并运行没有破坏.
所以我像这样修改了keybindings.json:
[
{ "key": "shift+ctrl+f5", "command": "workbench.action.debug.play",
"when": "inDebugMode" },
{ "key": "shift+ctrl+f5", "command": "workbench.action.debug.start",
"when": "!inDebugMode" },
]
Run Code Online (Sandbox Code Playgroud)
我尝试按shift + ctrl + f5启动程序 - 我仍然无法调试我的程序.
我收到以下错误:
错误:连接失败
当我运行节点而不是电子时,调试器在从命令行启动应用程序时工作正常
请帮忙!
提前致谢