2022-08-23 electron 调试

https://blog.csdn.net/weixin_38080573/article/details/105048111

渲染线程放在浏览器中调试
主线程可放在vscode中调试,需要配置一下.

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Electron Main",
      "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
      "program": "${workspaceFolder}/main.js",
      "protocol": "legacy"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/main.js"
    }
  ]
}

你可能感兴趣的:(2022-08-23 electron 调试)