Fix debugging

This commit is contained in:
Thomas Nordquist
2019-01-16 00:33:03 +01:00
parent 1eeaee0fe0
commit ab6938c7da

View File

@@ -4,7 +4,7 @@ const log = require('electron-log');
const { ConnectionManager, updateNotifier } = require('./backend/build/backend/src/index.js') const { ConnectionManager, updateNotifier } = require('./backend/build/backend/src/index.js')
const fs = require('fs') const fs = require('fs')
const path = require('path') const path = require('path')
require('electron-debug')({enabled: true}); require('electron-debug')({enabled: process.argv[2] === '--debug'});
autoUpdater.logger = log; autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = 'info'; autoUpdater.logger.transports.file.level = 'info';
@@ -33,10 +33,6 @@ function createWindow () {
// and load the index.html of the app. // and load the index.html of the app.
mainWindow.loadFile('app/index.html') mainWindow.loadFile('app/index.html')
// Open the DevTools.
if (process.argv[2] === '--debug') {
mainWindow.webContents.openDevTools()
}
// Emitted when the window is closed. // Emitted when the window is closed.
mainWindow.on('close', function () { mainWindow.on('close', function () {
connectionManager.closeAllConnections() connectionManager.closeAllConnections()