$npx skillfedfor your agent

traceback-with-variables

Adds variables to python traceback. Simple, lightweight, controllable. Debug reasons of exceptions by logging or pretty printing colorful variable contexts for each frame in a stacktrace, showing every value. Dump locals environments after errors to console, files, and loggers. Works with Jupyter and IPython.

Worth itPyPI LibrariesReleased Oct 2025761.4K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — traceback_with_variables-2.2.1-py3-none-any.whl
v2.2.1 · released 2025-10-24 · Python >=3.7

Yes. Zero runtime dependencies, permissive license, active maintenance, and no known vulnerabilities make it a safe, low-friction addition. The core value—eliminating repetitive debug logging—is real and saves time in both development and production troubleshooting. Install it if you regularly spend time reconstructing variable state from exceptions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.7 or later.
  • Low friction—pure Python wheel with no runtime dependencies.
  • Actively maintained with recent commits and steady adoption (761416 monthly downloads).

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute freely with minimal restrictions.

last release 2025-10-24 (294 days) · last repo commit 2026-07-30 · 702 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 761,416 downloads/mo, #5,128 on PyPI

Verify before relying

pip install traceback-with-variables==2.2.1

from traceback_with_variables import activate_by_import

# Your code now prints variables on any exception
def divide(a, b):
    return a / b

divide(10, 0)  # Traceback will show a, b values
  • Performance overhead when printing very large objects or deeply nested structures—description mentions speed but provides no benchmarks.
  • Behavior with sensitive data (passwords, tokens) in logs—documentation warns about this but does not detail filtering or redaction mechanisms.
Same gist for agents: .md · .json

What it is and what it does

traceback-with-variables is a lightweight debugging utility that intercepts Python exceptions and automatically prints the values of all local variables at each stack frame, without requiring you to manually add logging or exception-handling boilerplate. Instead of writing try-except blocks with formatted error messages listing every variable, you import the module once and get rich, colorized variable context for free whenever an exception occurs.

It works as a global hook (via activate_by_import), a decorator on individual functions, or a context manager around code blocks. You can also print the current stack without an exception, customize variable display length and filtering, and route output to loggers instead of stdout. The package is designed for both development debugging and small-scale production use, where the ability to see exactly what values caused a crash can save hours of reproduction and log-digging.

Use it for

  • Quickly diagnose why a function failed in development without adding temporary print statements or try-except blocks.
  • Log exceptions to a file or logger with full variable context for post-mortem debugging in production.
  • Inspect local state in Jupyter notebooks or IPython sessions after an error without re-running cells.
  • Reduce exception-handling boilerplate in data processing pipelines where you want to see intermediate values on failure.
  • Customize traceback output (e.g., skip certain files, limit string length) to keep logs readable while retaining key debug info.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Zero runtime dependencies, permissive license, active maintenance, and no known vulnerabilities make it a safe, low-friction addition. The core value—eliminating repetitive debug logging—is real and saves time in both development and production troubleshooting. Install it if you regularly spend time reconstructing variable state from exceptions.

Install

traceback-with-variables on PyPI

Before you install

Low friction—pure Python wheel with no runtime dependencies. Actively maintained with recent commits and steady adoption (761416 monthly downloads).

Requires Python 3.7 or later.

License in practice

MIT license (permissive) means you can use, modify, and distribute freely with minimal restrictions.

Quickstart

pip install traceback-with-variables==2.2.1

from traceback_with_variables import activate_by_import

# Your code now prints variables on any exception
def divide(a, b):
    return a / b

divide(10, 0)  # Traceback will show a, b values

Verify before relying

  • Performance overhead when printing very large objects or deeply nested structures—description mentions speed but provides no benchmarks.
  • Behavior with sensitive data (passwords, tokens) in logs—documentation warns about this but does not detail filtering or redaction mechanisms.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 294 days since the last release
Last repo commit
First released
Downloads761,416 / month, #5,128 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Software Development :: DebuggersTopic :: Software Development :: Libraries

Evidence: traceback_with_variables-2.2.1-py3-none-any.whl

Tags

Capabilities
python traceback with variablesdebug exception localspretty print stack traceexception variable inspectiontraceback debugging toolpython error context loggingstack frame variable dump
Topics
exception-debuggingtraceback-enhancementlogging-utility
PyPI keywords
pythontracebacklocalsloggingdebuggingprintvariablespython3stacktraceargumentserrorserror-handlingdumpexception-handlingexceptionsprettypretty-printframesimplecolorsjupyterjupyter-notebookipythoncustomize

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “debug exception locals”

  • traceback-with-variablesAutomatically captures and displays local variables in Python…
  • better-exceptionsFormats Python exceptions with syntax highlighting and local variable…
  • mo-logsProvides structured JSON logging with integrated exception handling…

Give your agent the search over MCP, or paste the wish link into any chat.

More Libraries packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
python-dateutil Worth it
PyPI · Libraries · released Mar 2024

Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.

Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.

Apache-2.0pure Python
1.2Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.

MITpure Python · 3.10+
1.1Bdownloads / mo

See also tracebackturbo3 · tracerite · environ · snoop · tblib · mozcrash · crashtest · stackprinter · better-exceptions · wasabi