Skip to content

Commit 7a26c76

Browse files
committed
fix(electron): do not always enable devtools detach mode (#8273)
1 parent 714b7b8 commit 7a26c76

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

packages/frontend/apps/electron/src/main/windows-manager/main-window.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,7 @@ export async function openUrlInHiddenWindow(urlObj: URL) {
258258
});
259259

260260
if (BUILD_CONFIG.debug) {
261-
win.webContents.openDevTools({
262-
mode: 'detach',
263-
});
261+
win.webContents.openDevTools();
264262
}
265263

266264
win.on('close', e => {

packages/frontend/apps/electron/src/main/windows-manager/tab-views.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,7 @@ export class WebContentViewsManager {
817817

818818
view.webContents.loadURL(shellViewUrl).catch(err => logger.error(err));
819819
if (isDev) {
820-
view.webContents.openDevTools({
821-
mode: 'detach',
822-
});
820+
view.webContents.openDevTools();
823821
}
824822
}
825823

@@ -1003,17 +1001,13 @@ export const showDevTools = (id?: string) => {
10031001
getCustomThemeWindow()
10041002
.then(w => {
10051003
if (w && w.isFocused()) {
1006-
w.webContents.openDevTools({
1007-
mode: 'detach',
1008-
});
1004+
w.webContents.openDevTools();
10091005
} else {
10101006
const view = id
10111007
? WebContentViewsManager.instance.getViewById(id)
10121008
: WebContentViewsManager.instance.activeWorkbenchView;
10131009
if (view) {
1014-
view.webContents.openDevTools({
1015-
mode: 'detach',
1016-
});
1010+
view.webContents.openDevTools();
10171011
}
10181012
}
10191013
})

0 commit comments

Comments
 (0)