Code Monkey home page Code Monkey logo

dexc's Introduction

dexc

This Python project is an exception formatter that produces readable stack traces.

It only supports Python 3.12 and later.

Features

Current features

  • Context displayed in addition to the trace line of each frame
  • Reversed frame order i.e. JavaScript-like
  • Truncated trace lines when there are too many
  • Colorized stack trace obeying the the NO_COLOR environment variable
  • Minimzed frames when those are not part of the user code
  • Support for exception groups
  • Highlighting of re-raises i.e. when an exception is caught and re-raised with more than a simple raise, causing two stack traces to be concatenated without separation
  • Formatting of unraisable exceptions e.g. raised in a destructor
  • Support for syntax errors

Future features

  • Better checks e.g. when the column number is not available but the line number is
  • Improve support for exception groups
  • User vs lib tb kinds
  • Avoid repeating recursive calls e.g. infinite loop
  • Maximum screen width
  • Option to reverse order
  • Better highlight re-raises
  • More ast nodes supported
  • More precise ast node targeting e.g. should work if all statements are on the same line
  • Handle multiprocessing.pool.RemoteTraceback which currently is text
  • Better highlighting using ast data (e.g. only highlight first line of for loop)
  • Formatting of exceptions raised in threads
  • Better handling of file paths e.g. site-packages
  • Perhaps syntax highlighting
  • Avoid highlighting large nodes e.g. highlight a function and parentheses instead of the arguments if the function call is failing
  • Other escape codes e.g. curly underlines or clickable file names
  • Other characters

Installation

$ pip install dexc

Usage

import dexc
dexc.install()

Prior art

dexc's People

Contributors

slietar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.