diff --git a/src/main/main.ts b/src/main/main.ts index 10f8b949434dee9820b2b4f7ce20e9de39af2be8..b7d62b7e9cd010213797650e662a686c8c0cfd86 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -30,6 +30,10 @@ import { getLogFilePath, } from './util'; +import installExtension, { + REACT_DEVELOPER_TOOLS, +} from 'electron-devtools-installer'; + const fs = require('fs'); const Tail = require('tail').Tail; @@ -414,6 +418,13 @@ app .then(() => { createWindow(); + if (isDebug) { + console.log('installing react dev tools'); + installExtension(REACT_DEVELOPER_TOOLS) + .then((name) => console.log(`Added Extension: ${name}`)) + .catch((err) => console.log('An error occurred: ', err)); + } + app.on('activate', () => { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open.