diff --git a/src/Yarhl/FileSystem/Node.cs b/src/Yarhl/FileSystem/Node.cs
index d16d0766..d3265cbe 100644
--- a/src/Yarhl/FileSystem/Node.cs
+++ b/src/Yarhl/FileSystem/Node.cs
@@ -21,12 +21,14 @@ namespace Yarhl.FileSystem
{
using System;
using System.Collections.Generic;
+ using System.Diagnostics;
using Yarhl.FileFormat;
using Yarhl.IO;
///
/// Node in the FileSystem with an associated format.
///
+ [DebuggerDisplay("{Name} [{Format}]")]
public partial class Node : NavigableNode
{
///
diff --git a/src/Yarhl/FileSystem/NodeContainerFormat.cs b/src/Yarhl/FileSystem/NodeContainerFormat.cs
index 317afa13..a0ce8a9f 100644
--- a/src/Yarhl/FileSystem/NodeContainerFormat.cs
+++ b/src/Yarhl/FileSystem/NodeContainerFormat.cs
@@ -20,12 +20,14 @@
namespace Yarhl.FileSystem
{
using System;
+ using System.Diagnostics;
using System.Linq;
using Yarhl.FileFormat;
///
/// Node container format for unpack / pack files.
///
+ [DebuggerDisplay("Container: count={Root.Children.Count}")]
public class NodeContainerFormat : IDisposable, ICloneableFormat
{
bool manageRoot;
diff --git a/src/Yarhl/IO/BinaryFormat.cs b/src/Yarhl/IO/BinaryFormat.cs
index 0ec00791..daf13110 100644
--- a/src/Yarhl/IO/BinaryFormat.cs
+++ b/src/Yarhl/IO/BinaryFormat.cs
@@ -20,12 +20,14 @@
namespace Yarhl.IO
{
using System;
+ using System.Diagnostics;
using System.IO;
using Yarhl.FileFormat;
///
/// Binary format.
///
+ [DebuggerDisplay("Binary: {Stream}")]
public class BinaryFormat : IBinary, IDisposable, ICloneableFormat
{
///
diff --git a/src/Yarhl/IO/DataStream.cs b/src/Yarhl/IO/DataStream.cs
index 18bf9331..ef9b2e37 100644
--- a/src/Yarhl/IO/DataStream.cs
+++ b/src/Yarhl/IO/DataStream.cs
@@ -23,10 +23,10 @@ namespace Yarhl.IO
using System.Buffers;
using System.Collections.Concurrent;
using System.Collections.Generic;
+ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
- using Yarhl.FileFormat;
using Yarhl.IO.StreamFormat;
///
@@ -43,6 +43,10 @@ namespace Yarhl.IO
"",
"S3881",
Justification = "Historical reasons: https://docs.microsoft.com/en-us/dotnet/api/system.io.stream.dispose")]
+ [DebuggerDisplay(
+ "pos={\"0x\" + Position.ToString(\"X\")}, " +
+ "len={\"0x\" + Length.ToString(\"X\")}, " +
+ "offset={\"0x\" + Offset.ToString(\"X\")}")]
public partial class DataStream : Stream
{
static readonly ConcurrentDictionary Instances = new ConcurrentDictionary();