Comments (5)
AttachDevTools
is part of the DevTools package (ie. Avalonia.Diagnostics
). Most people don't want to add extra debugging dependencies at runtime, so the conditional compilation is there to ensure it doesn't make it into release mode. DevTools is also incompatible with NativeAOT. So this is a reasonable default, IMO.
attachDevTools
is maybe a bit poorly described for a parameter that's only intended to work in debug builds, but renaming this would be a breaking change.
The easiest workaround for both debug+release configs is probably to handle attaching yourself:
public MainWindow()
{
InitializeComponent(attachDevTools: false);
this.AttachDevTools();
}
from avalonia.
I think you've completely missed the point. The parameter name can stay as is, all I'm asking for is to also add it in Release builds. No behavior change, just allowing me to refer to that parameter in Release mode because currently the parameter is unavailable.
from avalonia.
attachDevTools
is only available if Avalonia.Diagnostics
is available. The source generator checks for this and generates different code based on its availability:
The default project templates exclude DevTools in Release builds, so your project probably has something like:
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" />
When it should be like this if you always want it:
<PackageReference Include="Avalonia.Diagnostics" />
from avalonia.
Huh, I didn't know that. Then, wouldn't it be convenient to still add the parameter, regardless of whether the package is included?
from avalonia.
Maybe it was done to restrict devs from using the parameter when DevTools isn't available and silently doing nothing (or throwing?). I originally thought it was always available, too, until I checked the source.
from avalonia.
Related Issues (20)
- After Update from 11.0 to 11.1.3 published app has runtime errors with double packed resources HOT 7
- Emojis are rendered in black and white since version 11.1.0 for certain font weights HOT 2
- Application freezes when opening a new window from a menu item click (might be in AOT builds only?) HOT 4
- Win+H dialog is not working correctly HOT 1
- Linux Debian Cinnamon -> Shown Window with ShowDialog is not modal
- version >= 11.1.0-beta2 FluentAvalonia TextBox and SelectableTextBox contextflyout command not working HOT 1
- ContextMenu.ItemsSource binding acts as OneTime even if specified otherwise HOT 1
- MenuItem: Accelerator keys parsing removes multiple underscores from label
- Add stack trace to remote protocol ExceptionDetails
- Every image looks pixelated despite RenderOptions set to "HighQuality" HOT 1
- ScrollViewer + SelectableTextBlock: app just silently dies when I try to show about 1-2 MB of text HOT 4
- Preview functionality fails for project names exceeding 11 characters in VSCode
- Avalonia 11.1.3 UI freeze seems to be related to the input box. (TextInputFramework!FailFastWithHR+0x95) HOT 2
- Hide a window on alt-tab menu when ShowInTaskBar=False HOT 1
- Allow NumericUpDown Buttons to immediately update Value with UpdateSourceTrigger=LostFocus
- IActivatableLifetime does not work anymore on iOS HOT 2
- Source for Avalonia.BuildServices is missing HOT 1
- Unable to bind to DynamicObject derived classes HOT 3
- avalonia 11.1.3: when tabitem becomes invisible through binding, its contents remain visible
- Repeated Crash From Skia HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avalonia.