This file provides guidance to Claude Code when working with code in this repository.
These rules override all other instructions:
- NEVER commit directly to main - Always create a feature branch and submit a pull request
- Conventional commits - Format:
type(scope): description - GitHub Issues for TODOs - Use
ghCLI to manage issues, no local TODO files - Pull Request titles - Use conventional commit format (same as commits)
- Branch naming - Use format:
type/scope/short-description(e.g.,feat/visualizer/add-json-support) - Working an issue - Always create a new branch from an updated main branch
- Check branch status before pushing - Verify remote tracking branch exists
- No co-authors - Do not add co-author information on commits or pull requests
- No "generated by" statements - Do not add generated-by statements on pull requests
- No #pragma warning directives - Fix warnings properly instead of suppressing them with #pragma directives
- Consistent naming - Assembly name and root namespace must match the folder/project name
Debugalizers is a Visual Studio extension providing custom debug visualizers for string data. It supports various formats including JSON, XML, YAML, JWT, Base64, and more.
- Framework: .NET Framework 4.8
- SDK: CodingWithCalvin.VsixSdk 0.4.0
- Target: Visual Studio 2022 (17.x)
- UI Framework: WPF
- Syntax Highlighting: AvalonEdit
# Build the solution
dotnet build src/CodingWithCalvin.Debugalizers.slnx
# Build in Release mode
dotnet build src/CodingWithCalvin.Debugalizers.slnx --configuration Release
# Run tests
dotnet test src/CodingWithCalvin.Debugalizers.slnxsrc/
├── CodingWithCalvin.Debugalizers/ # Main VSIX project
│ ├── Visualizers/ # Debug visualizer implementations
│ │ ├── DataFormats/ # JSON, XML, YAML, etc.
│ │ ├── Encoded/ # Base64, URL encoded, etc.
│ │ ├── Security/ # JWT, SAML, Certificates
│ │ ├── Structured/ # URI, Connection strings, etc.
│ │ └── Binary/ # Hex dump, GUID, Timestamp
│ ├── UI/ # WPF views and windows
│ │ └── Views/ # Individual view controls
│ └── Services/ # Core services
└── CodingWithCalvin.Debugalizers.Tests/ # Unit tests
All visualizers extend BaseVisualizer:
[assembly: DebuggerVisualizer(
typeof(JsonVisualizer),
typeof(VisualizerObjectSource),
Target = typeof(string),
Description = "Debugalizers: JSON")]
public class JsonVisualizer : BaseVisualizer
{
protected override string Title => "JSON";
protected override VisualizerType Type => VisualizerType.Json;
protected override IEnumerable<ViewType> SupportedViews =>
new[] { ViewType.Formatted, ViewType.Tree, ViewType.Raw };
}- FormatDetector: Auto-detects content type from strings
- ContentFormatter: Pretty-prints and formats various content types
- EncodingDecoder: Decodes Base64, URL encoding, HTML entities, etc.
- ImageDecoder: Decodes Base64/data URI images
- SyntaxHighlighter: Provides AvalonEdit syntax highlighting
- Create a new class in the appropriate
Visualizers/subdirectory - Extend
BaseVisualizer - Add the
[assembly: DebuggerVisualizer(...)]attribute - Implement the required properties (
Title,Type,SupportedViews) - If needed, add parsing logic to the appropriate service
- Add unit tests in the Tests project
The project uses xUnit with FluentAssertions. Tests cover:
- Format detection (
FormatDetectorTests) - Content formatting (
ContentFormatterTests) - Encoding/decoding (
EncodingDecoderTests) - Image decoding (
ImageDecoderTests) - Syntax highlighting (
SyntaxHighlighterTests)
| Package | Purpose |
|---|---|
| AvalonEdit | Syntax highlighting |
| Newtonsoft.Json | JSON parsing |
| YamlDotNet | YAML parsing |
| Tomlyn | TOML parsing |
| System.IdentityModel.Tokens.Jwt | JWT decoding |
| Markdig | Markdown rendering |
| NCrontab | Cron expression parsing |
| CsvHelper | CSV parsing |