langchain-debug-bundle

SKILL.md

LangChain Debug Bundle

Contents

Overview

Collect comprehensive debug information for LangChain issues including traces, versions, and reproduction steps.

Prerequisites

  • LangChain installed
  • Reproducible error condition
  • Access to logs and environment

Instructions

Step 1: Collect Environment Info

Run pip show on all LangChain packages to gather versions, Python version, and platform info.

Step 2: Enable Full Tracing

Set langchain.debug = True and enable LangSmith tracing. Attach a DebugCallback that logs all LLM start/end/error events with timestamps.

Step 3: Create Minimal Reproduction

Write a standalone script that reproduces the issue with minimal code and redacted API keys.

Step 4: Generate Debug Bundle

Combine environment info, trace logs, and reproduction steps into a debug_bundle.json file.

See detailed implementation for complete debug callback and bundle generator code.

Output

  • debug_bundle.json with full diagnostic information
  • minimal_repro.py for issue reproduction
  • Environment and version information
  • Trace logs with timestamps

Error Handling

Issue Cause Solution
Callback not capturing Not attached to LLM Pass via callbacks= parameter
Large trace logs Long-running operation Filter by time range
API key in logs Missing redaction Always redact before sharing

Examples

Basic usage: Apply langchain debug bundle to a standard project setup with default configuration options.

Advanced scenario: Customize langchain debug bundle for production environments with multiple constraints and team-specific requirements.

Resources

Next Steps

Use langchain-common-errors for quick fixes or escalate with the bundle.

Weekly Installs
15
GitHub Stars
1.6K
First Seen
Feb 18, 2026
Installed on
gemini-cli15
github-copilot15
amp15
codex15
kimi-cli15
opencode15