-
Notifications
You must be signed in to change notification settings - Fork 37.1k
[dev] shortcut to open devtools attached to exthost #253139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
With electron/electron#46690 merged into electron v35, its probably also worth adding that flag (in dev only?) so you can see network traffic using this shortcut. |
|
This is great /cc @hediet who was interested in this feature.
It already added via #250374, unless an inspector client connects there is no cost from the network diagnostic channel so it is fine to have the flag always #250374 (comment) |
|
We are closing the |
|
LMK if there is any feedback I can help address. |
|
Thanks for the PR! Can you look into the merge conflict? |
|
Merge conflict fixed. |
| if (!parentWindow) { | ||
| return; | ||
| } | ||
| const options = this.instantiationService.invokeFunction(defaultBrowserWindowOptions, defaultWindowState(), { forceNativeTitlebar: true, hideBecauseShadowWindow: false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmm1 @deepak1556 curious what hideBecauseShadowWindow exactly is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag is from an unrelated branch, sorry about that.
| const options = this.instantiationService.invokeFunction(defaultBrowserWindowOptions, defaultWindowState(), { forceNativeTitlebar: true, hideBecauseShadowWindow: false }); | ||
| options.backgroundColor = undefined; | ||
|
|
||
| const devToolsWindow = new BrowserWindow(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmm1 @deepak1556 I was expecting some code similar to the GPU window in the method below that would close this window when the parent window closes?
parentWindow.win?.on('close', () => {| const devToolsWindow = new BrowserWindow(options); | ||
| devToolsWindow.setMenuBarVisibility(false); | ||
| devToolsWindow.loadURL(url); | ||
| devToolsWindow.once('ready-to-show', () => devToolsWindow.show()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tmm1 @deepak1556 similar, we have code in the GPU case where we restore if the window is minimized, why not extract the code for these 2 windows into something reusable?
const window = BrowserWindow.fromId(this.gpuInfoWindowId);
if (window?.isMinimized()) {
window?.restore();
}
window?.focus();|
I opened #259819 as follow up. |
Currently it is possible to debug the extension host using the vscode js debugger.
But many developers are more familiar and comfortable using the chrome devtools UI.
This PR adds a shortcut to open the devtools connected to exthost (w/ optional picker if using affinity + multiple local exthosts).
cc @deepak1556 @bpasero