Aspire, Visual Studio 2022 and Firefox Tabs - Closing a new Firefox Window can close your debugging session and vice versa
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
For ASP.Net Core apps a new browser window is started if "launchBrowser: true" is set in launchsettings.json.
However, for Aspire this is different: With Firefox, instead of opening a new window, a new tab is
opened in an already active Firefox browser (if present).
This behavior seems to confuse the tooling as it doesn't know which process to monitor to determine when to end the debugging session. The tooling waits for a new Firefox process to watch, leading to the following issues:
a) The debugging session does not close when the existing Firefox process exits.
b) The debugging session closes when the next Firefox process exists which was spawned after starting the Aspire App.
c) The next Firefox process spawned after starting the Aspire App is closed if the debugging session is stopped, **which may result in data loss**.
See attached video
https://github.com/user-attachments/assets/5d16095c-0e2b-4fa6-b049-4768891c9b7b
### Expected Behavior
A new Firefox window should be opened, and the correct process should be monitored to ensure proper debugging session management.
### Steps To Reproduce
1. Set "launchBrowser" to true in launchsettings.json.
2. Open a Firefox browser.
3. Start debugging the Aspire App with Firefox as the default browser.
4. Notice that a new tab is opened instead of a new window.
5. Observe the described issues when the debugging session is stopped.
### Exceptions (if any)
_No response_
### .NET Version info
.NET SDK:
Version: 8.0.400-preview.0.24324.5
Commit: 736a2616db
Workload version: 8.0.400-manifests.88eef10b
MSBuild version: 17.11.0+1192b22fd
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.400-preview.0.24324.5\
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[wasm-tools]
Installation Source: VS 17.10.35027.167
Manifest Version: 8.0.7/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.7\WorkloadManifest.json
Install Type: FileBased
[wasm-tools-net6]
Installation Source: VS 17.10.35027.167
Manifest Version: 8.0.7/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net6\8.0.7\WorkloadManifest.json
Install Type: FileBased
[aspire]
Installation Source: VS 17.11.35103.136
Manifest Version: 8.0.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0\WorkloadManifest.json
Install Type: FileBased
Host:
Version: 8.0.7
Architecture: x64
Commit: 2aade6beb0
.NET SDKs installed:
8.0.303 [C:\Program Files\dotnet\sdk]
8.0.400-preview.0.24324.5 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.7 [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/download
### Anything else?
IDE: Visual Studio 2022 (17.10.4)
Contributor guide
Assessment
This issue has not been assessed yet.