mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
enabled debugging
This commit is contained in:
parent
139639b990
commit
2cbb28eb56
15
src/emain.ts
15
src/emain.ts
@ -183,6 +183,21 @@ function createMainWindow(clientData) {
|
||||
},
|
||||
backgroundColor: '#000',
|
||||
});
|
||||
// open dev tools while developing - TODO: can make it at a part of node --debug flag
|
||||
if (isDev) {
|
||||
win.webContents.openDevTools();
|
||||
win.webContents.on('context-menu', (e, params) => {
|
||||
electron.Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Inspect element',
|
||||
click: () => {
|
||||
win.webContents.inspectElement(params.x, params.y);
|
||||
}
|
||||
}
|
||||
]).popup(win);
|
||||
});
|
||||
}
|
||||
|
||||
let indexHtml = (isDev ? "index-dev.html" : "index.html");
|
||||
win.loadFile(path.join(getAppBasePath(), "static", indexHtml));
|
||||
win.webContents.on("before-input-event", (e, input) => {
|
||||
|
Loading…
Reference in New Issue
Block a user