diff --git a/src/browser/components/MainPage.jsx b/src/browser/components/MainPage.jsx index 40f3a149..fbdd4a17 100644 --- a/src/browser/components/MainPage.jsx +++ b/src/browser/components/MainPage.jsx @@ -112,6 +112,10 @@ export default class MainPage extends React.Component { focusListener(); }); + ipcRenderer.on('open-devtool', () => { + document.getElementById(`mattermostView${self.state.key}`).openDevTools(); + }); + //goBack and goForward ipcRenderer.on('go-back', () => { const mattermost = self.refs[`mattermostView${self.state.key}`]; diff --git a/src/main/menus/app.js b/src/main/menus/app.js index b083c4e7..147d47f1 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -145,7 +145,7 @@ function createTemplate(mainWindow, config, isDev) { visible: false, role: 'zoomout', }, separatorItem, { - label: 'Toggle Developer Tools', + label: 'Developer Tools for Application Wrapper', accelerator: (() => { if (process.platform === 'darwin') { return 'Alt+Command+I'; @@ -157,6 +157,11 @@ function createTemplate(mainWindow, config, isDev) { focusedWindow.toggleDevTools(); } }, + }, { + label: 'Developer Tools for Current Server', + click() { + mainWindow.webContents.send('open-devtool'); + }, }], }); template.push({