# Development Tools
**Referenced Files in This Document**
- [ObjectInspectorWindow.axaml](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml)
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [ObjectInspectorData.cs](file://ClassicAssist.Shared/UI/Models/ObjectInspectorData.cs)
- [HexDumpControl.axaml](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
- [DebugWindow.axaml](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [GIFRecorderWindow.axaml](file://ClassicAssist/Views/GIFRecorderWindow.xaml)
- [GIFRecorderWindow.xaml.cs](file://ClassicAssist/Views/GIFRecorderWindow.xaml.cs)
- [GIFRecorderViewModel.cs](file://ClassicAssist/ViewModels/GIFRecorderViewModel.cs)
- [ShowGIFCaptureWindow.cs](file://ClassicAssist/Data/Hotkeys/Commands/ShowGIFCaptureWindow.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
## Table of Contents
1. [Introduction](#introduction)
2. [Project Structure](#project-structure)
3. [Core Components](#core-components)
4. [Architecture Overview](#architecture-overview)
5. [Detailed Component Analysis](#detailed-component-analysis)
6. [Dependency Analysis](#dependency-analysis)
7. [Performance Considerations](#performance-considerations)
8. [Troubleshooting Guide](#troubleshooting-guide)
9. [Conclusion](#conclusion)
## Introduction
This document explains the development and debugging tools available in ClassicAssist.Avalonia with a focus on:
- Object Inspector for real-time entity inspection, property viewing, and memory analysis
- Packet Logger for network traffic analysis, replay system functionality, and custom filter creation
- GIF Recorder for gameplay recording, animation export, and quality settings configuration
- Debug Window for console output, log viewing, and diagnostic information
- Hex Dump utilities for binary data inspection and protocol analysis
- Integration with external debugging tools and profiling utilities
- Performance monitoring and memory leak detection techniques
- Practical guidance for using these tools during development and troubleshooting
## Project Structure
The development and debugging features are implemented across shared UI models and view models, Avalonia-specific views and controls, and core networking components. The following diagram shows how key pieces fit together at a high level.
```mermaid
graph TB
subgraph "Avalonia UI"
OIWin["ObjectInspectorWindow"]
DW["DebugWindow"]
HD["HexDumpControl"]
GRWin["GIFRecorderWindow"]
end
subgraph "Shared UI Layer"
OIVM["ObjectInspectorViewModel"]
DVM["DebugViewModel"]
PE["PacketEntry"]
ECV["EntityCollectionViewerViewModel"]
AOV["ActiveObjectsViewModel"]
end
subgraph "Networking Core"
IPF["IncomingPacketFilters"]
OPF["OutgoingPacketFilters"]
IPH["IncomingPacketHandlers"]
OPH["OutgoingPacketHandlers"]
PF["PacketFilter"]
PFC["PacketFilterCondition"]
PFCs["PacketFilterConditions"]
PFI["PacketFilterInfo"]
PWE["PacketWaitEntries"]
PWEt["PacketWaitEntry"]
end
subgraph "Tests"
RPL["ReplayPacketLog"]
end
OIWin --> OIVM
DW --> DVM
HD --> PE
GRWin --> |"Hotkey Command"| GRWin
OIVM --> ECV
OIVM --> AOV
PE --> IPF
PE --> OPF
IPF --> PF
OPF --> PF
PF --> PFC
PF --> PFCs
PF --> PFI
PF --> PWE
PWE --> PWEt
RPL --> IPH
RPL --> OPH
```
**Diagram sources**
- [ObjectInspectorWindow.axaml](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml)
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [ObjectInspectorData.cs](file://ClassicAssist.Shared/UI/Models/ObjectInspectorData.cs)
- [DebugWindow.axaml](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [HexDumpControl.axaml](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
- [GIFRecorderWindow.axaml](file://ClassicAssist/Views/GIFRecorderWindow.xaml)
- [GIFRecorderWindow.xaml.cs](file://ClassicAssist/Views/GIFRecorderWindow.xaml.cs)
- [ShowGIFCaptureWindow.cs](file://ClassicAssist/Data/Hotkeys/Commands/ShowGIFCaptureWindow.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
**Section sources**
- [ObjectInspectorWindow.axaml](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml)
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [ObjectInspectorData.cs](file://ClassicAssist.Shared/UI/Models/ObjectInspectorData.cs)
- [DebugWindow.axaml](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [HexDumpControl.axaml](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
- [GIFRecorderWindow.axaml](file://ClassicAssist/Views/GIFRecorderWindow.xaml)
- [GIFRecorderWindow.xaml.cs](file://ClassicAssist/Views/GIFRecorderWindow.xaml.cs)
- [ShowGIFCaptureWindow.cs](file://ClassicAssist/Data/Hotkeys/Commands/ShowGIFCaptureWindow.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
## Core Components
- Object Inspector: Provides live inspection of entities and their properties, supports filtering and sorting, and exposes data suitable for memory analysis workflows.
- Packet Logger: Captures incoming and outgoing packets, integrates with filters and wait entries, and supports replay via test harnesses.
- GIF Recorder: Records gameplay to GIF files, exposes quality and export options, and is accessible via hotkeys.
- Debug Window: Displays console output, logs, and diagnostics for rapid iteration and troubleshooting.
- Hex Dump Control: Renders raw bytes in hex and ASCII for protocol analysis and binary inspection.
**Section sources**
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [ObjectInspectorData.cs](file://ClassicAssist.Shared/UI/Models/ObjectInspectorData.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [GIFRecorderWindow.xaml.cs](file://ClassicAssist/Views/GIFRecorderWindow.xaml.cs)
- [GIFRecorderViewModel.cs](file://ClassicAssist/ViewModels/GIFRecorderViewModel.cs)
- [ShowGIFCaptureWindow.cs](file://ClassicAssist/Data/Hotkeys/Commands/ShowGIFCaptureWindow.cs)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
## Architecture Overview
The development tools follow a layered architecture:
- UI layer (Avalonia): Windows and controls render state from ViewModels and shared models.
- Shared UI layer: ViewModels and models provide cross-platform UI logic and data structures.
- Networking core: Packet handlers and filters manage capture, processing, and replay.
```mermaid
sequenceDiagram
participant User as "Developer"
participant OIWin as "ObjectInspectorWindow"
participant OIVM as "ObjectInspectorViewModel"
participant ECV as "EntityCollectionViewerViewModel"
participant AOV as "ActiveObjectsViewModel"
User->>OIWin : Open Object Inspector
OIWin->>OIVM : Initialize ViewModel
OIVM->>ECV : Load entity collections
OIVM->>AOV : Load active objects
OIVM-->>OIWin : Bind properties and lists
User->>OIVM : Select entity / change filter
OIVM-->>User : Updated object details and properties
```
**Diagram sources**
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
## Detailed Component Analysis
### Object Inspector
Purpose:
- Real-time inspection of game entities and their properties
- Filtering and sorting for large datasets
- Data exposure for memory analysis workflows
Key elements:
- View: ObjectInspectorWindow (Avalonia XAML and code-behind)
- ViewModel: ObjectInspectorViewModel (shared)
- Model: ObjectInspectorData (shared)
- Supporting ViewModels: EntityCollectionViewerViewModel, ActiveObjectsViewModel
```mermaid
classDiagram
class ObjectInspectorWindow {
+InitializeComponent()
+OnLoaded()
}
class ObjectInspectorViewModel {
+SelectedEntity
+Properties
+FilterText
+SortMode
+Refresh()
+ApplyFilter()
}
class ObjectInspectorData {
+Name
+Type
+Properties
}
class EntityCollectionViewerViewModel {
+Entities
+Filter
+SortStyle
}
class ActiveObjectsViewModel {
+ActiveList
+SelectItem()
}
ObjectInspectorWindow --> ObjectInspectorViewModel : "binds to"
ObjectInspectorViewModel --> ObjectInspectorData : "produces"
ObjectInspectorViewModel --> EntityCollectionViewerViewModel : "uses"
ObjectInspectorViewModel --> ActiveObjectsViewModel : "uses"
```
**Diagram sources**
- [ObjectInspectorWindow.axaml](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml)
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [ObjectInspectorData.cs](file://ClassicAssist.Shared/UI/Models/ObjectInspectorData.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
Usage tips:
- Use filters to narrow down entities by name or type
- Sort by common attributes to locate recently updated objects
- Inspect nested properties to understand state changes over time
**Section sources**
- [ObjectInspectorWindow.axaml](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml)
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [ObjectInspectorData.cs](file://ClassicAssist.Shared/UI/Models/ObjectInspectorData.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
### Packet Logger and Replay System
Purpose:
- Capture and analyze incoming/outgoing network traffic
- Apply custom filters to isolate relevant packets
- Replay captured sessions for testing and debugging
Key elements:
- UI model: PacketEntry (shared)
- Filters: IncomingPacketFilters, OutgoingPacketFilters
- Filter engine: PacketFilter, PacketFilterCondition, PacketFilterConditions, PacketFilterInfo
- Wait entries: PacketWaitEntries, PacketWaitEntry
- Handlers: IncomingPacketHandlers, OutgoingPacketHandlers
- Replay: ReplayPacketLog (tests)
```mermaid
flowchart TD
Start(["Packet Arrives"]) --> Classify["Classify Direction
Incoming/Outgoing"]
Classify --> ApplyFilters{"Apply Filters?"}
ApplyFilters --> |No| Drop["Drop Packet"]
ApplyFilters --> |Yes| Log["Create PacketEntry"]
Log --> UpdateUI["Update UI Models"]
UpdateUI --> WaitCheck{"Any Wait Entries?"}
WaitCheck --> |Yes| ResolveWait["Resolve PacketWaitEntry"]
WaitCheck --> |No| End(["End"])
ResolveWait --> End
```
**Diagram sources**
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
Custom filter creation:
- Implement conditions using the filter condition types
- Register filters through the incoming/outgoing filter managers
- Use PacketFilterInfo to describe metadata and enable/disable filters at runtime
Replay workflow:
- ReplayPacketLog drives packet handlers to re-execute recorded sessions
- Useful for reproducing issues deterministically
**Section sources**
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
### GIF Recorder
Purpose:
- Record gameplay to GIF files
- Configure quality and export settings
- Accessible via hotkeys for quick capture
Key elements:
- View: GIFRecorderWindow (XAML and code-behind)
- ViewModel: GIFRecorderViewModel
- Hotkey command: ShowGIFCaptureWindow
```mermaid
sequenceDiagram
participant Dev as "Developer"
participant HK as "ShowGIFCaptureWindow"
participant Win as "GIFRecorderWindow"
participant VM as "GIFRecorderViewModel"
Dev->>HK : Trigger hotkey
HK->>Win : Open recorder window
Win->>VM : Initialize recording settings
Dev->>VM : Start/Stop recording
VM-->>Dev : Export GIF with configured quality
```
**Diagram sources**
- [ShowGIFCaptureWindow.cs](file://ClassicAssist/Data/Hotkeys/Commands/ShowGIFCaptureWindow.cs)
- [GIFRecorderWindow.xaml](file://ClassicAssist/Views/GIFRecorderWindow.xaml)
- [GIFRecorderWindow.xaml.cs](file://ClassicAssist/Views/GIFRecorderWindow.xaml.cs)
- [GIFRecorderViewModel.cs](file://ClassicAssist/ViewModels/GIFRecorderViewModel.cs)
Quality and export guidance:
- Adjust frame rate and compression to balance file size vs. smoothness
- Prefer lower resolutions for long recordings
- Use targeted captures around specific events to reduce overhead
**Section sources**
- [ShowGIFCaptureWindow.cs](file://ClassicAssist/Data/Hotkeys/Commands/ShowGIFCaptureWindow.cs)
- [GIFRecorderWindow.xaml](file://ClassicAssist/Views/GIFRecorderWindow.xaml)
- [GIFRecorderWindow.xaml.cs](file://ClassicAssist/Views/GIFRecorderWindow.xaml.cs)
- [GIFRecorderViewModel.cs](file://ClassicAssist/ViewModels/GIFRecorderViewModel.cs)
### Debug Window
Purpose:
- Display console output and logs
- Provide diagnostic information for rapid troubleshooting
Key elements:
- View: DebugWindow (Avalonia XAML and code-behind)
- ViewModel: DebugViewModel (shared)
```mermaid
classDiagram
class DebugWindow {
+InitializeComponent()
+OnLoaded()
}
class DebugViewModel {
+Logs
+ConsoleOutput
+ClearLogs()
+AppendLog(message)
}
DebugWindow --> DebugViewModel : "binds to"
```
**Diagram sources**
- [DebugWindow.axaml](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
Best practices:
- Use structured log messages with severity levels
- Clear logs periodically to avoid UI lag
- Correlate timestamps with packet logs and GIF captures
**Section sources**
- [DebugWindow.axaml](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
### Hex Dump Utilities
Purpose:
- Inspect raw binary data
- Analyze protocol payloads and packet contents
Key elements:
- Control: HexDumpControl (Avalonia XAML and code-behind)
- Data model: PacketEntry (shared)
```mermaid
classDiagram
class HexDumpControl {
+Render(bytes)
+SetHighlight(range)
}
class PacketEntry {
+RawBytes
+Direction
+Timestamp
}
HexDumpControl --> PacketEntry : "displays"
```
**Diagram sources**
- [HexDumpControl.axaml](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
Tips:
- Highlight known header fields to speed up protocol analysis
- Combine with packet filters to focus on specific opcodes or ranges
**Section sources**
- [HexDumpControl.axaml](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
## Dependency Analysis
The following diagram maps dependencies between UI components, shared models, and networking core.
```mermaid
graph LR
OIWin["ObjectInspectorWindow"] --> OIVM["ObjectInspectorViewModel"]
OIVM --> ECV["EntityCollectionViewerViewModel"]
OIVM --> AOV["ActiveObjectsViewModel"]
DW["DebugWindow"] --> DVM["DebugViewModel"]
HD["HexDumpControl"] --> PE["PacketEntry"]
IPF["IncomingPacketFilters"] --> PF["PacketFilter"]
OPF["OutgoingPacketFilters"] --> PF
PF --> PFC["PacketFilterCondition"]
PF --> PFCs["PacketFilterConditions"]
PF --> PFI["PacketFilterInfo"]
PF --> PWE["PacketWaitEntries"]
PWE --> PWEt["PacketWaitEntry"]
RPL["ReplayPacketLog"] --> IPH["IncomingPacketHandlers"]
RPL --> OPH["OutgoingPacketHandlers"]
```
**Diagram sources**
- [ObjectInspectorWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/ObjectInspectorWindow.axaml.cs)
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [EntityCollectionViewerViewModel.cs](file://ClassicAssist/ViewModels/EntityCollectionViewerViewModel.cs)
- [ActiveObjectsViewModel.cs](file://ClassicAssist/ViewModels/ActiveObjectsViewModel.cs)
- [DebugWindow.axaml.cs](file://ClassicAssist.Avalonia/Views/DebugWindow.axaml.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
**Section sources**
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [PacketEntry.cs](file://ClassicAssist.Shared/UI/Misc/PacketEntry.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [PacketFilter.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilter.cs)
- [PacketFilterCondition.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterCondition.cs)
- [PacketFilterConditions.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterConditions.cs)
- [PacketFilterInfo.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketFilterInfo.cs)
- [PacketWaitEntries.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntries.cs)
- [PacketWaitEntry.cs](file://ClassicAssist.Shared/UO/Network/PacketFilter/PacketWaitEntry.cs)
- [ReplayPacketLog.cs](file://ClassicAssist.Tests/ReplayPacketLog.cs)
- [IncomingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketHandlers.cs)
- [OutgoingPacketHandlers.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketHandlers.cs)
## Performance Considerations
- Object Inspector:
- Use incremental refresh and virtualization-friendly bindings to keep UI responsive with large entity sets
- Debounce filter input to avoid excessive recomputation
- Packet Logger:
- Limit logged packets with precise filters; avoid logging every packet when not needed
- Batch UI updates to prevent frame drops during heavy traffic
- GIF Recorder:
- Lower frame rates and resolution for long recordings
- Avoid capturing while performing CPU-intensive tasks
- Debug Window:
- Periodically clear logs to prevent memory growth
- Use asynchronous append operations to avoid blocking UI thread
- Hex Dump:
- Render only visible portions of large buffers
- Avoid frequent full redraws; use diff-based updates where possible
[No sources needed since this section provides general guidance]
## Troubleshooting Guide
Common issues and remedies:
- Object Inspector appears unresponsive:
- Ensure filters are not overly broad; refine search criteria
- Check that collection ViewModels are updating on the correct dispatcher
- Packet Logger misses packets:
- Verify filters are enabled and conditions match expected opcodes
- Confirm handlers are registered and not dropping packets prematurely
- GIF Recorder produces low-quality output:
- Increase frame rate and adjust compression settings
- Reduce scene complexity during capture
- Debug Window slows down:
- Clear logs regularly and avoid appending extremely large messages
- Hex Dump flickers or lags:
- Limit buffer sizes shown and avoid constant full refreshes
**Section sources**
- [ObjectInspectorViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/ObjectInspectorViewModel.cs)
- [IncomingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/IncomingPacketFilters.cs)
- [OutgoingPacketFilters.cs](file://ClassicAssist.Shared/UO/Network/OutgoingPacketFilters.cs)
- [GIFRecorderViewModel.cs](file://ClassicAssist/ViewModels/GIFRecorderViewModel.cs)
- [DebugViewModel.cs](file://ClassicAssist.Shared/UI/ViewModels/DebugViewModel.cs)
- [HexDumpControl.axaml.cs](file://ClassicAssist.Avalonia/Controls/HexDumpControl.axaml.cs)
## Conclusion
ClassicAssist.Avalonia’s development and debugging toolkit provides powerful capabilities for inspecting game state, analyzing network traffic, recording gameplay, and diagnosing issues quickly. By combining the Object Inspector, Packet Logger with custom filters and replay, GIF Recorder with tunable quality, Debug Window for logs, and Hex Dump for binary analysis, developers can efficiently troubleshoot and optimize their applications. Adopting the performance and troubleshooting recommendations will help maintain responsiveness and reliability during intensive development cycles.