1.渲染进程

  1. 开发者工具栏

在启动的应用程序界面,菜单中找到 view -> toggle developer tool
点击打开:控制台工具

2.主进程

  1. 使用VSCode调试

菜单栏点击运行->添加配置->Node.js

  1. {
  2. "version": "0.2.0",
  3. "configurations": [
  4. {
  5. "name": "EE框架-local模式-本地",
  6. "type": "node",
  7. "request": "launch",
  8. "cwd": "${workspaceFolder}",
  9. "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
  10. "windows": {
  11. "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
  12. },
  13. "args": [
  14. ".",
  15. "--env=local"
  16. ]
  17. }
  18. ]
  19. }

运行调试
image.png