-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
New and improved DevTools. #3462
Conversation
Can we have that part to be pluggable? Preferably shipped in a separate package. So people won't need to ship the entire compiler with the app to use dev tools. Also not that it's not really linker-friendly and definitely not iOS-friendly |
We could yeah, but I've got a bunch of stuff to finish that I think are higher-priority (such as Given that, I think there are a few options:
Not sure what people would prefer?
Are you talking about CoreRT here? |
Apps don't rely on DevTools so it's fine if the console breaks on iOS. I am sure there will be a solution for iOS the moment iOS support is stable. |
I think new DevTools are quite a step forward as it is much more usable interface. Console is also really handy for development. We should give an option to the people to completely remove it, maybe entire diagnostics needs to be pluggable in the end. But for now since we just released new version I think it will be fine to have this for a while until we come up with an idea for separating this feature. |
|
And why exactly do we need a dependency on |
Note that Thing is, afaik there's no so thing as "Debug build-only" dependency. You either have the dependency or you don't. The best you can do it to not reference code in the dependency when you don't want to ship it. Or am I mistaken? |
Hi I tested your PR locally and it seems to be working fine so far, except some smaller things.
|
One extra potential improvement: Allow for searching for event types in the |
We probably need to extract it to a separate package then. |
This prevents them being added to the core `Avalonia.nupkg`. Because diagnostics now has a dependency on `DataGrid` and roslyn scripting, ship it as a separate package.
And add explicit dependency on `Avalonia.Diagnostics` to samples.
This is now ready for review, I've made most of the suggested changes:
I didn't add the filter to the Events tab yet as that's a bit more involved and I'd like to get this finished for the moment so I can continue with other things. Note that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glanced over, submitting my immediate feedback and I shall return later to evaluate it further :)
Functionality wise LGTM.
src/Avalonia.Diagnostics/Diagnostics/Models/ConsoleHistoryItem.cs
Outdated
Show resolved
Hide resolved
src/Avalonia.Diagnostics/Diagnostics/ViewModels/ClrPropertyViewModel.cs
Outdated
Show resolved
Hide resolved
src/Avalonia.Diagnostics/Diagnostics/ViewModels/AvaloniaPropertyViewModel.cs
Outdated
Show resolved
Hide resolved
src/Avalonia.Diagnostics/Diagnostics/ViewModels/AvaloniaPropertyViewModel.cs
Outdated
Show resolved
Hide resolved
@@ -1,6 +1,3 @@ | |||
// Copyright (c) The Avalonia Project. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why half the files have license header and half do not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simply, the ones where I modified an old file still have headers. I don't bother adding headers to files these days as it just feels like busywork and from what I've read legally it's meaningless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should delete existing headers on modified files? Not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH it would be good to be consistent at least. I have no problem with or without license info as long as we stick to one option.
src/Avalonia.Diagnostics/Diagnostics/ViewModels/TreePageViewModel.cs
Outdated
Show resolved
Hide resolved
src/Avalonia.Diagnostics/Diagnostics/ViewModels/ViewModelBase.cs
Outdated
Show resolved
Hide resolved
src/Avalonia.Diagnostics/Diagnostics/Views/EventsPageView.xaml.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a great improvement over current one so I see no reason to not merge this in :)
Note: we still need to make Roslyn dependency optional if we want devtools to be operational on iOS/WASM. |
TBH, I'm not sure how useful it would be there anyway, but yeah we can think about that when the time comes. |
For mobile the idea was to use our previewer protocol. You know, that one that can show our controls in browser. |
Currently the app itself shows the dev tools on demand. Why not make this a service you can connect to? So we could integrate this into the Visual Studio Extension or have it standalone. Snoop for example could just inject itself into the target application and it just worked. |
What does the pull request do?
Re-implements DevTools with a few new features:
Breaking Changes
Avalonia.Diagnostics
is now a separate NuGet package so if you're usingAttachDevTools
you'll have to add a reference to that.