Skip to main content

Informative Stacktrace that shows everything on the stack

Project description

Fattrace

Provides an informative (fat) stacktrace that shows everything on the stack.

Examples

Before:

After:

Highlights

  • Removes the need for printf and debugger
  • Special handling for array-like objects which have members that are named one of:
    • dtype
    • shape
    • device
    • layout
  • Similar to tbvaccine, optionally ignores frames from external libraries

Usage

Run fattrace.install() anywhere to replace the standard stack-trace hook (sys.excepthook).

Customization is done by the keyword arguments:

def install(threshold:int=3,
            include_self:bool=True,
            include_private:bool=False,
            include_external:bool=False,
            ignore:set[str]={},
            ignore_type:set[type]={},
            ):
    ...
  • threshold : the maximum number of elements to print in a list, tuple, dict, etc.
  • include_self : in a method call, whether to print the members of self.
  • include_private : If true, private variables and members whose names start with "__" are excluded from the trace.
  • include_external : if false (default), include assignments only if the code is under the current directory.
  • ignore : A set of strings. Variables and members matching any of the names are excluded from the trace.
  • ignore_type : A set of types. Variables and members matching any of the types are excluded from the trace.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fattrace-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fattrace-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file fattrace-0.0.2.tar.gz.

File metadata

  • Download URL: fattrace-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fattrace-0.0.2.tar.gz
Algorithm Hash digest
SHA256 53513958e18bc5d2fd52410c7ac75e44e26efe3ae433fb1d2f02103d234506e4
MD5 680c4b9e84a1b438605a3063160647e7
BLAKE2b-256 f5185cb57de24258349b235ee9c7a3bdbec94e6044a437eaad12e73a9e7b4a6c

See more details on using hashes here.

File details

Details for the file fattrace-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: fattrace-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for fattrace-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6750052e1e5474d66be80bad138aec1e497072527647ca350d620e903a2a0c94
MD5 dc67c9c9cb4bf4ba9838f795b58738c8
BLAKE2b-256 d81b5fa8798d77fc121149995a4aeee3fda60d2ee2fc638ccd2c8ea159191209

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page