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

Focus is repeatedly stolen from terminal #125800

Closed
jsoref opened this issue Jun 9, 2021 · 10 comments
Closed

Focus is repeatedly stolen from terminal #125800

jsoref opened this issue Jun 9, 2021 · 10 comments
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@jsoref
Copy link
Contributor

jsoref commented Jun 9, 2021

Issue Type: Bug

  1. Open dotnet/winforms project
  2. Click on the terminal tab
  3. Repeat step 2
output.steals.focus.from.terminal.mov

VS Code version: Code 1.56.2 (054a929, 2021-05-12T17:44:30.902Z)
OS version: Darwin x64 19.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz (8 x 2500)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 3
Memory (System) 16.00GB (0.71GB free)
Process Argv --crash-reporter-id 1fc67ee2-0174-4598-9f98-4537df0dd32c
Screen Reader no
VM 0%
Extensions (55)
Extension Author (truncated) Version
vscode-bazel Baz 0.4.1
LinkCheckMD bla 0.3.1
open-in-macdown Cod 1.0.0
vscode-zonefile Com 0.0.4
vscode-markdownlint Dav 0.42.0
jshint dba 0.11.0
vscode-eslint dba 2.1.20
dhall-lang dha 0.0.4
docs-article-templates doc 0.2.11
docs-authoring-pack doc 0.1.13
docs-images doc 0.0.9
docs-linting doc 0.0.7
docs-markdown doc 0.2.94
docs-metadata doc 1.0.6
docs-preview doc 0.3.57
docs-scaffolding doc 0.0.8
docs-yaml doc 0.2.6
EditorConfig Edi 0.16.4
prettier-vscode esb 6.4.0
go gol 0.25.1
terraform has 2.12.0
haskell has 1.4.0
hive-sql jos 0.0.4
language-haskell jus 3.4.0
vscode-sbt-scala lig 0.2.4
autoconf mae 0.1.0
hg mrc 1.7.1
vscode-docker ms- 1.13.0
csharp ms- 1.23.12
vscode-kubernetes-tools ms- 1.3.3
vscode-postgresql ms- 0.3.0
python ms- 2021.5.842923320
vscode-pylance ms- 2021.6.0
jupyter ms- 2021.6.832593372
cmake-tools ms- 1.7.3
cpptools ms- 1.4.1
powershell ms- 2021.5.1
vscode-typescript-tslint-plugin ms- 1.3.3
fabric8-analytics red 0.3.3
java red 0.79.2
vscode-commons red 0.0.6
vscode-xml red 0.16.1
vscode-yaml red 0.19.2
preview-vscode sea 2.2.5
code-spell-checker str 1.10.2
html-preview-vscode tht 0.2.5
simple-rst tro 1.0.1
cmake twx 0.0.17
vscodeintellicode Vis 1.2.14
vscode-java-debug vsc 0.34.0
vscode-java-dependency vsc 0.18.4
vscode-java-pack vsc 0.16.0
vscode-java-test vsc 0.30.0
vscode-maven vsc 0.31.0
markdown-all-in-one yzh 3.4.0
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30311712
vspre833:30267464
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30286553
pythonvsuse255cf:30311221
vscgsv2:30307504
vscorehov:30309549
vscod805cf:30301675
binariesv517:30312825

@gjsjohnmurray
Copy link
Contributor

Is one of your extensions causing this? Maybe use the "Start Extension Bisect" command to investigate.

@jsoref
Copy link
Contributor Author

jsoref commented Jun 9, 2021

Possibly, I think it only happens if something decides it's a good idea to update the world. I'd bet on csharp.

Thing is, I've opened this project a number of times, and this was the first time it decided to do this, so I'm not precisely sure what caused it to decide to do something...

Here's the beginning of the output tab:

Starting OmniSharp server at 6/8/2021, 11:18:58 PM
    Target: /Users/jsoref/code/dotnet/winforms/Winforms.sln

OmniSharp server started.
    Path: /Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/run
    PID: 1331

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on MacOS 10.15.7 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 16.11.0 - "/Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 16.11.0 - "/Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin"
            CscToolExe = csc.exe
            MSBuildToolsPath = /Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin
            CscToolPath = /Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild/Current/Bin/Roslyn
            BypassFrameworkInstallChecks = true
            MSBuildExtensionsPath = /Users/jsoref/.vscode/extensions/ms-dotnettools.csharp-1.23.12/.omnisharp/1.37.10/omnisharp/.msbuild
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/Users/jsoref/code/dotnet/winforms'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/Users/jsoref/code/dotnet/winforms/Winforms.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/src/System.Windows.Forms.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/UnitTests/System.Windows.Forms.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Design/tests/UnitTests/System.Windows.Forms.Design.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Design/src/System.Windows.Forms.Design.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Drawing.Design/src/System.Drawing.Design.Facade.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Design/src/System.Design.Facade.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/pkg/Microsoft.Private.Winforms/Microsoft.Private.Winforms.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/pkg/Microsoft.Dotnet.WinForms.ProjectTemplates/Microsoft.Dotnet.Winforms.ProjectTemplates.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/System.Windows.Forms.IntegrationTests/System.Windows.Forms.IntegrationTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Drawing/src/System.Drawing.Facade.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/Accessibility/ver/Accessibility-version.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiButtonTests/MauiButtonTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiListViewTests/MauiListViewTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/System.Windows.Forms.Maui.IntegrationTests/System.Windows.Forms.Maui.IntegrationTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/System.Windows.Forms.IntegrationTests.Common/System.Windows.Forms.IntegrationTests.Common.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiComboBoxTests/MauiComboBoxTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/AccessibilityTests/AccessibilityTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/Microsoft.VisualBasic/tests/UnitTests/Microsoft.VisualBasic.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/Microsoft.VisualBasic/src/Microsoft.VisualBasic.Facade.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/Microsoft.VisualBasic/tests/IntegrationTests/Microsoft.VisualBasic.IntegrationTests/Microsoft.VisualBasic.IntegrationTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/Microsoft.VisualBasic/tests/IntegrationTests/VisualBasicRuntimeTest/VisualBasicRuntimeTest.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiLabelTests/MauiLabelTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Primitives/src/System.Windows.Forms.Primitives.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Primitives/tests/UnitTests/System.Windows.Forms.Primitives.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Design.Editors/src/System.Windows.Forms.Design.Editors.Facade3x.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiPropertyGridViewTests/MauiPropertyGridViewTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiMonthCalendarTests/MauiMonthCalendarTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiTestsHelper/MauiTestsHelper.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Primitives/tests/TestUtilities/System.Windows.Forms.Primitives.TestUtilities.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/TestUtilities/System.Windows.Forms.TestUtilities.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiToolStripTests/MauiToolStripTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/InteropTests/System.Windows.Forms.Interop.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiPrintPreviewDialogTests/MauiPrintPreviewDialogTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.PrivateSourceGenerators/src/System.Windows.Forms.PrivateSourceGenerators.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.PrivateSourceGenerators/tests/UnitTests/System.Windows.Forms.PrivateSourceGenerators.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.Primitives/tests/TestUtilities.Tests/System.Windows.Forms.Primitives.TestUtilities.Tests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiTabControlTests/MauiTabControlTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/MauiRichTextBoxTests/MauiRichTextBoxTests.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DemoConsole/DemoConsole.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/DesignSurface/DesignSurfaceExt/DesignSurfaceExt.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/MauiTests/ImageListTests/MauiImageListTests.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/jsoref/code/dotnet/winforms'.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/Users/jsoref/code/dotnet/winforms' on host 1064.
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
[warn]: OmniSharp.MSBuild.ProjectLoader
        Unable to locate the .NET SDK as specified by global.json, please check that the specified version is installed.
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj'.
/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj
/Users/jsoref/code/dotnet/winforms/src/System.Design/src/System.Design.Facade.csproj(0,0): Error: Unable to locate the .NET SDK as specified by global.json, please check that the specified version is installed.

[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/src/System.Windows.Forms.csproj
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
[warn]: OmniSharp.MSBuild.ProjectLoader
        Unable to locate the .NET SDK as specified by global.json, please check that the specified version is installed.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/WinformsControlsTest.csproj'
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/src/System.Windows.Forms.csproj'.
/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/src/System.Windows.Forms.csproj
/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms.PrivateSourceGenerators/src/System.Windows.Forms.PrivateSourceGenerators.csproj(0,0): Error: Unable to locate the .NET SDK as specified by global.json, please check that the specified version is installed.

[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/src/System.Windows.Forms.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /Users/jsoref/code/dotnet/winforms/src/System.Windows.Forms/tests/UnitTests/System.Windows.Forms.Tests.csproj
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
A compatible installed .NET SDK for global.json version [6.0.100-preview.3.21202.5] from [/Users/jsoref/code/dotnet/winforms/global.json] was not found.
Install the [6.0.100-preview.3.21202.5] .NET SDK or update [/Users/jsoref/code/dotnet/winforms/global.json] with an installed .NET SDK:
[warn]: OmniSharp.MSBuild.ProjectLoader

@jsoref
Copy link
Contributor Author

jsoref commented Jun 11, 2021

I get messages saying that C# extension (ms-dotnettools.csharp) is having trouble loading while the focus stealing is happening.

That said. Personally, I'd rather VSCode be immune to this behavior than play whack-a-mole with individual misbehaving extensions.

Reproduced:

Version: 1.57.0
Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
Date: 2021-06-09T17:22:31.215Z (1 day ago)
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 20.5.0

@meganrogge meganrogge added the *caused-by-extension Issue identified to be caused by an extension label Jun 11, 2021
@Tyriar
Copy link
Member

Tyriar commented Jun 11, 2021

@jsoref we provide the API and we strive not to break API. Whack-a-mole is the way to go unfortunately as there are very legitimate uses for this and it would always be possible anyway by extensions running commands to show the output.

@jsoref
Copy link
Contributor Author

jsoref commented Jun 11, 2021

I'm glad to hear you care about APIs.

I'm an ex-browser developer. And web browsers care about APIs and compatibility too.

There is a very basic DOM API alert(). It couldn't be removed. But they decided that random web pages open in random windows, or random web pages in random tabs shouldn't steal focus. They didn't remove the alert() function entirely. But they did change it so that focus couldn't be stolen by other tabs/windows.

It turns out that user's experience was more important than imaginary API fidelity.

@Tyriar
Copy link
Member

Tyriar commented Jun 11, 2021

Right but even if we wanted to remove the API to show an output channel, you would still be able to do it with a command anyway since they're available to extensions, there are plenty of other commands that can play with focus too. But regardless, showing an extensions output channel is a very common thing to do, omnisharp probably just have a bug they need to fix.

cc @sandy081 just in case this is a bug on our end, omnisharp seems to be preserving focus https://github.com/OmniSharp/omnisharp-vscode/blob/d1785942e51f3afee1d8e62b406ee46b35168c63/src/observers/OmnisharpChannelObserver.ts#L34

@JoeRobich
Copy link
Member

The C# extension provides a setting ("csharp.showOmnisharpLogOnError") to control this behavior. It is unfortunate that during project loading the same error is being reported for each project in the workspace.

@jsoref
Copy link
Contributor Author

jsoref commented Jun 11, 2021

@Tyriar: I'm not saying something shouldn't happen in response to the API call. But, if another tab in the same set is currently focused, instead of switching the active tab, just paint the tab an attention (highlight) color and leave the focus alone.

Focus stealing is a very major anti-pattern. Especially if a user might be, e.g. entering a password, or a command which if incompletely entered could destroy something.

@sandy081
Copy link
Member

sandy081 commented Jul 6, 2021

just in case this is a bug on our end, omnisharp seems to be preserving focus

I just checked and preserve focus is working as expected.

@sandy081 sandy081 removed their assignment Jul 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

7 participants
@JoeRobich @jsoref @Tyriar @gjsjohnmurray @sandy081 @meganrogge and others