Open leidegre opened 11 months ago
Tagging @WardenGnaw for thoughts here since I'm not really sure if test can configure this separately. The feedback make sense and interestingly has been something we've heard in VS as well.
The terminal focus from the video is comming from building the project. Build runs in the terminal and it always shows. We need area-project-cps
to support only showing the terminal if there is build failures.
This is similar to https://github.com/microsoft/vscode-dotnettools/issues/402
Retargeting this issue to project system as the build that is triggered by the project system is what causes the terminal to pop to the foreground.
Want this too for debugging. There's nothing interesting printed to terminal by my program, I just want to interact with code and breakpoints. Popping up terminal is annoying
This behaviour also currently interacts poorly with the testing.openTesting
setting - the openOnTestFailure
/openExplorerOnTestStart
values work as expected, but the default value (openOnTestStart
) by default shows the Test Results first in the same panel the Terminal is shown, then immediately the Terminal takes focus - unless you've manually shown the Test Results pane, the tab header disappears immediately.
You can work around this by moving the Terminal/Test Results panes - but as someone with a 1080p display, there's not really a good place to keep both in a useful fashion.
I agree this is annoying. It just keeps my terminal to lose focus of the bottom pane to show up. Event my default build task in the task.json
is set as "presentation": { "reveal": "silent" }
.
The test should at leat run the build task of the task.json
.
Describe the feature you'd like
From the video you can see that when I click debug, the terminal opens which is a problem because it covers the entire screen. So I have to close it. This happens almost as fast as I hit the breakpoint and is really annoying. It would be much better if the terminal only received focus if there was a build error or something preventing the debugger from launching.
https://github.com/microsoft/vscode-dotnettools/assets/63085/94944253-0594-43df-bfb3-a34a68c2679f
Alternatives considered
I have looked for every possible setting I could find relating to terminal, focus and C# DevKit to change this behavior without any luck.
Environment Information
VSCode version: 1.84.2 C# Extension: 2.13.10 Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.6a1e483a Runtime Environment: OS Name: Windows OS Version: 10.0.22631 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100\ .NET workloads installed: Workload version: 8.0.100-manifests.6a1e483a There are no installed workloads to display. Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71 .NET SDKs installed: 7.0.404 [C:\Program Files\dotnet\sdk] 8.0.100 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation] Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/downloadVisual Studio Code Extensions
|Extension|Author|Version|Folder Name| |---|---|---|---| |asciidoctor-vscode|asciidoctor|3.1.10|asciidoctor.asciidoctor-vscode-3.1.10| |code-spell-checker|streetsidesoftware|3.0.1|streetsidesoftware.code-spell-checker-3.0.1| |cpptools|ms-vscode|1.18.5|ms-vscode.cpptools-1.18.5-win32-x64| |csdevkit|ms-dotnettools|1.1.16|ms-dotnettools.csdevkit-1.1.16-win32-x64| |csharp|ms-dotnettools|2.13.10|ms-dotnettools.csharp-2.13.10-win32-x64| |EditorConfig|EditorConfig|0.16.4|editorconfig.editorconfig-0.16.4| |go|golang|0.40.0|golang.go-0.40.0| |hexeditor|ms-vscode|1.9.12|ms-vscode.hexeditor-1.9.12| |lua|sumneko|3.7.3|sumneko.lua-3.7.3-win32-x64| |prettier-vscode|esbenp|10.1.0|esbenp.prettier-vscode-10.1.0| |vscode-dotnet-runtime|ms-dotnettools|2.0.0|ms-dotnettools.vscode-dotnet-runtime-2.0.0| |vscode-proto3|zxh404|0.5.5|zxh404.vscode-proto3-0.5.5| |vscodeintellicode-csharp|ms-dotnettools|0.1.26|ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64| |xml|DotJoshJohnson|2.5.1|dotjoshjohnson.xml-2.5.1|;