xyDebugConsole 1.0.1
dotnet add package xyDebugConsole --version 1.0.1
NuGet\Install-Package xyDebugConsole -Version 1.0.1
<PackageReference Include="xyDebugConsole" Version="1.0.1" />
<PackageVersion Include="xyDebugConsole" Version="1.0.1" />
<PackageReference Include="xyDebugConsole" />
paket add xyDebugConsole --version 1.0.1
#r "nuget: xyDebugConsole, 1.0.1"
#:package xyDebugConsole@1.0.1
#addin nuget:?package=xyDebugConsole&version=1.0.1
#tool nuget:?package=xyDebugConsole&version=1.0.1
xyDebugConsole
A few Avalonia building blocks for making debug output visible somewhere: a window that shows
logs, and one that starts an external program and captures its output. Part of xyToolz.
Installation
dotnet add package xyDebugConsole
What's in it
DebugConsole– a window that shows whatever gets written into it. It has no idea where the logs actually come from, it only knowsILogSinkand a couple of events.DebugConsoleSink– the bridge toxyLogger. ImplementsILogSinkand writes formatted log entries into aTextWriter. This is what hooks the console up to a logger.ExternalProcessMonitorWindow– its own window, starts a program and shows its stdout/stderr. Has nothing to do withDebugConsole, works on its own.ConsoleTextBoxWriter– small helper that redirectsConsole.Writecalls into an AvaloniaTextBox.
Usage
Hooking the console up to a xyAsyncLogger<T>:
using xyDebugConsole.Services;
using xyDebugConsole.Views;
using xyLogger.Loggers;
using xyLogger.Models;
var debugConsole = new DebugConsole();
debugConsole.Show();
var logger = new xyAsyncLogger<xyDefaultLogEntry>();
logger.AddSink(new DebugConsoleSink(debugConsole.Writer));
logger.Log("App started", LogLevel.Information);
For apps that haven't moved to xyAsyncLogger<T> yet and still use the static xyLog events,
debugConsole.AttachToStaticLogger() also works — more of a stopgap for legacy code than
something to reach for by default.
Monitoring a program, independent of the debug console:
var monitor = new ExternalProcessMonitorWindow();
monitor.Show();
await monitor.MonitorProcessAsync("ipconfig");
Requirements
.NET 8, Avalonia. Runs on Windows, Linux, and macOS.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Avalonia (>= 11.3.3)
- Avalonia.Diagnostics (>= 11.3.3)
- Avalonia.Fonts.Inter (>= 11.3.3)
- Avalonia.ReactiveUI (>= 11.3.3)
- Avalonia.Themes.Fluent (>= 11.3.3)
- xyLogger (>= 1.0.4)
- xyToolz (>= 1.3.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.