Skip to content
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

Do not steal focus from VS Code editor #1935

Open
stewartadam opened this issue Aug 22, 2024 · 3 comments
Open

Do not steal focus from VS Code editor #1935

stewartadam opened this issue Aug 22, 2024 · 3 comments
Labels

Comments

@stewartadam
Copy link

Describe the bug.

Various extensions depend on the .NET install tool to grab the .NET SDK. As a result, on each initialization of the editor it steals focus from the user to display the Output tab -- for example:

ms-azuretools.vscode-bicep: Trying to install .NET 8.0.8~arm64 but it already exists. No downloads or changes were made.

See also:

Please attach log file(s) here if you have any.

8/22/2024, 10:10:21 AM DotnetWSLCheckEvent
Checking if system is WSL. OS: darwin

8/22/2024, 10:10:50 AM DotnetAcquisitionRequested
8.0
bcf1754f51e047c9496e95489f0796759eadf89b340c12bde65beaf959b7d7d8

8/22/2024, 10:10:50 AM DotnetRuntimeAcquisitionRequested
8.0
bcf1754f51e047c9496e95489f0796759eadf89b340c12bde65beaf959b7d7d8
runtime

8/22/2024, 10:10:50 AM WebRequestSent
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json

8/22/2024, 10:10:50 AM DotnetVersionResolutionCompleted
8.0
8.0.8

8/22/2024, 10:10:50 AM DotnetInstallIdCreatedEvent
The requested version 8.0.8 is now marked under the install: {"installId":"8.0.8~arm64","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"runtime"}.

8/22/2024, 10:10:50 AM DotnetLockAttemptingAcquireEvent
Lock Acquisition request to begin.
2024-08-22T17:10:50.472Z
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installing.lock
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installing.lock

8/22/2024, 10:10:50 AM DotnetLockAttemptingAcquireEvent
Lock Acquisition request to begin.
2024-08-22T17:10:50.476Z
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock

8/22/2024, 10:10:50 AM FoundTrackingVersions
installing :


8/22/2024, 10:10:50 AM DotnetLockReleasedEvent
Lock about to be released.
2024-08-22T17:10:50.481Z
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installing.lock
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installing.lock

8/22/2024, 10:10:50 AM FoundTrackingVersions
installed :
{"installId":"8.0.7~arm64","version":"8.0.7","architecture":"arm64","isGlobal":false,"installMode":"runtime"} owned by ms-azuretools.vscode-bicep
,{"installId":"8.0.8~arm64","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"runtime"} owned by ms-azuretools.vscode-bicep
,{"installId":"8.0.8~arm64~aspnetcore","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"aspnetcore"} owned by ms-dotnettools.csdevkit


8/22/2024, 10:10:50 AM DotnetLockReleasedEvent
Lock about to be released.
2024-08-22T17:10:50.482Z
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock

8/22/2024, 10:10:50 AM DotnetInstallationValidated
8.0.8~arm64
8.0.8~arm64
8.0.8
arm64
false
runtime

8/22/2024, 10:10:50 AM DotnetAcquisitionAlreadyInstalled
8.0.8~arm64
8.0.8
arm64
false
runtime
bcf1754f51e047c9496e95489f0796759eadf89b340c12bde65beaf959b7d7d8

8/22/2024, 10:10:50 AM DotnetLockAttemptingAcquireEvent
Lock Acquisition request to begin.
2024-08-22T17:10:50.485Z
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock

8/22/2024, 10:10:50 AM RemovingVersionFromExtensionState
Adding {"installId":"8.0.8~arm64","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"runtime"} with id installed from the state.

8/22/2024, 10:10:50 AM FoundTrackingVersions
installed :
{"installId":"8.0.7~arm64","version":"8.0.7","architecture":"arm64","isGlobal":false,"installMode":"runtime"} owned by ms-azuretools.vscode-bicep
,{"installId":"8.0.8~arm64","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"runtime"} owned by ms-azuretools.vscode-bicep
,{"installId":"8.0.8~arm64~aspnetcore","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"aspnetcore"} owned by ms-dotnettools.csdevkit


8/22/2024, 10:10:50 AM AddTrackingVersions
Updated installed :
{"installId":"8.0.7~arm64","version":"8.0.7","architecture":"arm64","isGlobal":false,"installMode":"runtime"} owned by ms-azuretools.vscode-bicep
,{"installId":"8.0.8~arm64","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"runtime"} owned by ms-azuretools.vscode-bicep
,{"installId":"8.0.8~arm64~aspnetcore","version":"8.0.8","architecture":"arm64","isGlobal":false,"installMode":"aspnetcore"} owned by ms-dotnettools.csdevkit


8/22/2024, 10:10:50 AM DotnetLockReleasedEvent
Lock about to be released.
2024-08-22T17:10:50.492Z
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock
/Users/stewartadam/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.1.5/dist/installed.lock

8/22/2024, 10:10:50 AM DotnetCommandSucceeded
acquire

8/22/2024, 10:10:50 AM DotnetAcquisitionTotalSuccessEvent
8.0.8
8.0.8~arm64
8.0.8~arm64
8.0.8
arm64
false
runtime
bcf1754f51e047c9496e95489f0796759eadf89b340c12bde65beaf959b7d7d8
/Users/stewartadam/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/8.0.8~arm64/dotnet

8/22/2024, 10:10:50 AM DotnetRuntimeAcquisitionTotalSuccessEvent
8.0.8~arm64
8.0.8
arm64
false
runtime

Reproduction Steps

Open VS Code

Expected Behavior

Focus is not stolen to Output tab to display an message that is not actionable by the user

Exceptions & Errors (if any)

No response

.NET Install Tool Version

v2.1.5

Your operating system? Please provide more detail, such as the version and or distro above.

OSX / Darwin / Mac

VS Code Version

Version: 1.92.2 Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9 Date: 2024-08-14T17:29:30.058Z Electron: 30.1.2 ElectronBuildId: 9870757 Chromium: 124.0.6367.243 Node.js: 20.14.0 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.6.0

@stewartadam stewartadam changed the title Do not stealing focus from VS Code editor Do not steal focus from VS Code editor Aug 22, 2024
@AoutoCooper
Copy link

Man this is crazy. I've been looking all over the web to find a solution to this problem, found 5 threads in 5 minutes running over years with multiple users complaining, all of them closed with no real reason or answer, at best referencing a mega thread where the VSCode team themselves discuss the philosophical implications of preventing the output tab from stealing focus. I have zero idea why this is such an issue. Just add a toggle to prevent logging.

@baronfel
Copy link
Member

We should be able to prevent focus while still writing to the output channel. If there's a catastrophic failure then we can add a button to our notification toast to open the output channel for details.

This is just one of those decisions that was made years ago that we haven't revisited in some time. The world (and user expectations) have changed, it's reasonable to be more demure, more mindful with our logging.

@nagilson
Copy link
Member

nagilson commented Sep 4, 2024

Yes, I believe @lifengl had made some sort of initiative to improve our UI for this to stop producing output in this channel. Maybe it's gone to a window notification based approach. I'm not sure that's better here, but for this message in particular we definitely dont need to draw away attention.

Anyway, this is something I should take care of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants