-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Aux window - registration flawed when devtools is opened #209073
Comments
@connor4312 does it reproduce without having devtools opened in any of the windows? |
@deepak1556 this one takes me by surprise: in the main process I keep track of auxiliary windows and so far I have been using So I do think that I am doing something wrong and I need a different way how to figure out the window ID of a floating window... I track the creation of floating windows here from the vscode/src/vs/code/electron-main/app.ts Lines 393 to 400 in e2dc70e
|
Ah, that's the repro. Yes, you must have devtools open when you open the aux window. Opening them after the aux window is already open doesn't cause an issue, but once you do open them then the event won't fire properly until vs code is restarted |
That is not the intended contract in the runtime, a BrowserWindow can have multiple WebContents at any point and their ids are independent. WebContent ids are incremental within the same process, so it purely depends on the creation order.
You can use BrowserWindow.getWebContents to get the owner window and that should give you the right id. |
@deepak1556 I tried that, but at the time So essentially, I have no way to find the window for the web contents so early. |
I think maintaining a |
Yeah, an alternative would be to pro-long aux-window handshake between main and renderer until the |
This bug has been fixed in the latest release of VS Code Insiders! @connor4312, you can help us out by commenting If things still don't seem right, please ensure you're on version f8d35f6 of Insiders (today's or later - you can use Happy Coding! |
Set a breakpoint or log here
vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.ts
Line 195 in e49b522
Move or copy a file into a new floating window
Switch between them a few times. The event fires a couple times but then stops firing
The text was updated successfully, but these errors were encountered: