添加错误日志
This commit is contained in:
parent
a20c833de0
commit
4fbcf0e319
6
main.js
6
main.js
|
|
@ -8,6 +8,7 @@ const {
|
|||
ipcMain,
|
||||
clipboard,
|
||||
dialog,
|
||||
crashReporter,
|
||||
desktopCapturer,
|
||||
} = require('electron');
|
||||
const path = require('node:path')
|
||||
|
|
@ -100,6 +101,11 @@ const additionalData = { myKey: 'myValue' }
|
|||
app.on('ready', () => {
|
||||
const gotTheLock = app.requestSingleInstanceLock(additionalData)
|
||||
if (gotTheLock) {
|
||||
app.getPath('crashDumps')
|
||||
crashReporter.start({
|
||||
uploadToServer: false,
|
||||
ignoreSystemCrashHandler: false
|
||||
})
|
||||
env = process.argv.find((arg) => arg.startsWith('--env='))?.split('=')[1];
|
||||
if (env === 'development') {
|
||||
Object.defineProperty(app, 'isPackaged', {
|
||||
|
|
|
|||
Loading…
Reference in New Issue