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
Certain log output channel only show up in the first vscode window #89559
Comments
@eamodio Cant reproduce this. Any specific steps? |
Hrm, seems to work fine if you open a new window from inside vscode, but if you do it from outside (via taskbar button) then it always reproduces for me. |
Does the command |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
@bpasero Is there anything special if opening a window from taskbar that the environment is not set correctly? |
@sandy081 I think we try to fetch the shell environment later on: vscode/src/vs/code/electron-main/app.ts Line 262 in 2548906
|
The env only runs when Code starts. If another instance of Code comes along, it just talks to the first one. No further env resolution happens. |
@eamodio Can you please help in debugging this and find the root cause? Here is the code pointer where we register the output channels for the log files - Please check if the channels are getting created? |
@sandy081 I debugged this a bit and it seems like the issue is that we don't create the channel if the log file doesn't exist yet: Because we are not getting into that vscode/src/vs/workbench/contrib/logs/common/logs.contribution.ts Lines 77 to 81 in 7aa60ae
But I'm not sure why the file Uri is different (or at least I'm assuming it is, since it doesn't exist) |
Right, we create the channel only after file is created. But in this case the logs which were missing shall have files exist as they shall be same for all windows.
Can you please let me know what the URIs are ? |
@sandy081 It looks like the timestamps are different. First window:
2nd window:
|
Thanks @eamodio. This vscode/src/vs/platform/environment/node/environmentService.ts Lines 268 to 276 in 99a0740
@bpasero Your help is appreciated. |
@sandy081 very unlikely that a value you put into |
This value is put into process in electron main and I assume that all windows shall get this value? |
It seems After discussing @bpasero suggested to pass @joaomoreno any opinions as you came up with this pattern and not sure if there is any other reason. |
Do we know why it's not being set? |
Sorry I did not know why, @bpasero do you have any clue? |
@sandy081 again, please move away from using process environment for this purpose, it asks for trouble. The issue is this:
|
To further debug, check this line which sends the process environment over: vscode/src/vs/code/electron-main/main.ts Line 313 in 8d699df
Deleting |
Yes, I am in that process. Since @joaomoreno added this, checking with him to know any special reasons for doing this. |
Process environment is usually the least friction route: it requires no code to have environment variables propagate across spawned processes. |
Still happens for me on both stable and insiders on Windows
When running those steps with Insiders, the second window for me has 3 log options, whereas the first window has 6. |
Issue Type: Bug
First window:
Any window after the first:
VS Code version: Code - Insiders 1.42.0-insider (c4b6a6b, 2020-01-28T05:38:41.922Z)
OS version: Windows_NT x64 10.0.19041
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: