How to debug electron production binaries

前端 未结 6 1309
一个人的身影
一个人的身影 2021-02-02 11:44

I can\'t open devtools in the built version of my electron app. Therefore i want to find another solution to log any errors that only occur in the production version.

Is

6条回答
  •  野性不改
    2021-02-02 12:09

    In the main/index.js at the end of section app.on('ready') just add:

    mainWindow.webContents.openDevTools();

    Just for debugging, when electron opens an empty window, but the development version works fine, this way is very helpful for me.

提交回复
热议问题