Skip to content

Conversation

@tmm1
Copy link
Contributor

@tmm1 tmm1 commented Jul 1, 2025

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

@tmm1
Copy link
Contributor Author

tmm1 commented Jul 1, 2025

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.

@deepak1556
Copy link
Collaborator

This is great /cc @hediet who was interested in this feature.

its probably also worth adding that flag (in dev only?) so you can see network traffic using this shortcut.

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)

@deepak1556 deepak1556 added this to the July 2025 milestone Jul 1, 2025
@deepak1556
Copy link
Collaborator

We are closing the main branch for June 2025 endgame, so targeting this PR for July instead

@bpasero bpasero self-assigned this Jul 1, 2025
@bpasero bpasero removed this from the July 2025 milestone Jul 1, 2025
@tmm1
Copy link
Contributor Author

tmm1 commented Jul 14, 2025

LMK if there is any feedback I can help address.

hediet
hediet previously approved these changes Jul 22, 2025
@vs-code-engineering vs-code-engineering bot added this to the July 2025 milestone Jul 22, 2025
@hediet
Copy link
Member

hediet commented Jul 22, 2025

Thanks for the PR! Can you look into the merge conflict?

bhavyaus
bhavyaus previously approved these changes Jul 22, 2025
@tmm1 tmm1 dismissed stale reviews from bhavyaus and hediet via 0b49b0d July 22, 2025 23:04
@tmm1
Copy link
Contributor Author

tmm1 commented Jul 24, 2025

Merge conflict fixed.

@deepak1556 deepak1556 enabled auto-merge (squash) July 24, 2025 04:57
@deepak1556 deepak1556 merged commit 88fb69e into microsoft:main Jul 24, 2025
17 checks passed
if (!parentWindow) {
return;
}
const options = this.instantiationService.invokeFunction(defaultBrowserWindowOptions, defaultWindowState(), { forceNativeTitlebar: true, hideBecauseShadowWindow: false });
Copy link
Member

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?

Copy link
Contributor Author

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);
Copy link
Member

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());
Copy link
Member

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();

@bpasero
Copy link
Member

bpasero commented Aug 5, 2025

I opened #259819 as follow up.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants