Skip to content

ConnectOnStartup spawns multiple dev tools #20

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

Open
PerfectlyFineCode opened this issue Apr 12, 2025 · 6 comments
Open

ConnectOnStartup spawns multiple dev tools #20

PerfectlyFineCode opened this issue Apr 12, 2025 · 6 comments

Comments

@PerfectlyFineCode
Copy link

PerfectlyFineCode commented Apr 12, 2025

Describe the bug

Whenever you set ConnectOnStartup to true it will spawn multiple dev tools simultaneously at startup.

To Reproduce

  1. Install required dependencies
  2. Add this to App.axaml.cs initialize
this.AttachDeveloperTools(x =>
{
	x.ConnectOnStartup = true;
});
  1. Start application
  2. It should now spawn 3+ dev tool windows at startup.

Expected behavior

It should only spawn a single dev tool on startup.

Version information

Avalonia: 11.2.6
Dev Tools: 2.0.2

OS

Windows

Logs

No response

Additional context

No response

@maxkatz6
Copy link
Member

Do you have any previewer tabs opened at the same time?
It's by design supported use case. You can use Design.IsDesignMode to conditionally disable/enable ConnectOnStartup.

@PerfectlyFineCode
Copy link
Author

I do not have previewer open, no. I always use just the code view, and I use JetBrains Rider if that makes a difference.

@maxkatz6
Copy link
Member

@PerfectlyFineCode do you have any other repro? I don't see this issue. I also tried FluentAvalonia demo you used in another issue.

@PerfectlyFineCode
Copy link
Author

PerfectlyFineCode commented Apr 13, 2025

@PerfectlyFineCode do you have any other repro? I don't see this issue. I also tried FluentAvalonia demo you used in another issue.

It seems like if I have open multiple axaml tabs it spawns one for each of them.
I do however have no previewer open for any of them.

Image

@maxkatz6
Copy link
Member

@PerfectlyFineCode yes, for some reason previewer process is still running, even if it's not visible.
In 2.0.3 I changed default behavior, so ConnectOnStartup doesn't affect previewer builds.

@PerfectlyFineCode
Copy link
Author

PerfectlyFineCode commented Apr 15, 2025

For me it seems like it still opens multiple tools when multiple tabs are active, and I have updated both the application and the nuget package; I do not have a previewer open, both are set to 'Editor Only'

Image

@maxkatz6 maxkatz6 reopened this Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants