BeClaude

runtime-debugging

New
2Community RegistryGeneralby originalix

Debug runtime issues systematically with hypothesis generation, strategic instrumentation, and real-time log analysis. Inspired by Cursor's debug mode.

Community PluginView Source

Overview

Hypothesis-driven debugging with real-time log tracing — inspired by Cursor's debug mode

A Claude Code skill that brings systematic runtime debugging to any JavaScript/TypeScript environment: browsers, React Native, Node.js, and more.

Why This Exists

Traditional debugging with console.log is chaotic. You scatter logs everywhere, restart the app, and hope you guessed right. This skill teaches Claude to debug like an expert:

  1. Generate hypotheses first — Before touching code, identify 5-7 possible failure points
  2. Instrument strategically — Only add logs that test specific hypotheses
  3. Eliminate systematically — Use evidence to confirm or rule out each theory
  4. Clean up completely — Remove all instrumentation when done

Quick Start

1. Install

Option A: Claude Code Plugin (Recommended)

bash
# Add the marketplace
claude plugin marketplace add originalix/runtime-debugging

# Install the plugin
claude plugin install runtime-debugging@originalix-runtime-debugging

Option B: Manual Installation

bash
# Global (recommended)
git clone https://github.com/originalix/runtime-debugging.git ~/.claude/skills/runtime-debugging

# Or project-level
git clone https://github.com/originalix/runtime-debugging.git .claude/skills/runtime-debugging

2. Ask Claude to debug

code
Debug why position lines aren't showing on the chart

Claude will:

  • Ask clarifying questions about the issue
  • Generate hypotheses with likelihood ratings
  • Automatically start the debug server (no manual setup needed)
  • Instrument your code with targeted log points
  • Clear logs before each reproduction for clean traces
  • Analyze logs and identify the root cause

How It Works

code
┌─────────────────┐     HTTP POST      ┌─────────────────┐
│   Your App      │ ─────────────────► │  Debug Server   │
│  (instrumented) │                    │  (port 7243)    │
└─────────────────┘                    └────────┬────────┘
                                                │
                                                ▼
                                       ┌─────────────────┐
                                       │   debug.log     │
                                       │    (JSONL)      │
                                       └─────────────────┘

The skill injects fetch() calls that send structured log data to a local server. Logs are written to debug.log in your project root for analysis.

Environment Support

Claude will ask about your environment and configure the correct host automatically:

EnvironmentHost in fetch()
Mac Browser127.0.0.1
iOS Simulator127.0.0.1
Android Emulator10.0.2.2
Real iOS/Android DeviceYour Mac's LAN IP

Log Format

Logs are JSONL (newline-delimited JSON):

json
{"location":"File.ts:42","message":"function entry","data":{"param":"value"},"timestamp":1234567890,"hypothesisId":"A"}

Filter by hypothesis:

bash
cat debug.log | jq 'select(.hypothesisId == "A")'

Example Session

User: "The save button doesn't work sometimes"

Claude generates hypotheses:

IDLocationTheoryLikelihood
AonClick handlerEvent not firingMedium
BvalidateForm()Validation failing silentlyHigh
CsaveData()API call rejectedMedium
DState updateRace conditionLow

After instrumentation and reproduction:

code
Hypothesis Analysis:

| ID | Status | Evidence |
|----|--------|----------|
| A  | ELIMINATED | onClick fires every time |
| B  | CONFIRMED | Returns false when email contains '+' |
| C  | - | Not reached |

ROOT CAUSE: Email regex rejects valid addresses with '+' character.

Cleanup

All instrumentation is wrapped in markers for easy removal:

bash
# Preview
grep -n "#region agent log" src/

# Remove all
sed -i '' '/\/\/ #region agent log/,/\/\/ #endregion/d' src/**/*.ts

Requirements

  • Node.js (for the debug server)
  • Claude Code CLI

License

MIT

Install & Usage

1
Create the skills directory
mkdir -p .claude/skills
2
Download the skill file
mkdir -p .claude/skills && curl -o .claude/skills/runtime-debugging.md https://raw.githubusercontent.com/originalix/runtime-debugging/main/SKILL.md
3
Invoke in Claude Code
/runtime-debugging
View source on GitHub

Frequently Asked Questions

What is runtime-debugging?

Debug runtime issues systematically with hypothesis generation, strategic instrumentation, and real-time log analysis. Inspired by Cursor's debug mode.

How to install runtime-debugging?

To install runtime-debugging, create the .claude/skills directory in your project, then run the curl command to download the skill file. Once installed, invoke it in Claude Code with /runtime-debugging.

What is runtime-debugging best for?

runtime-debugging is a community categorized under General. Created by originalix.