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.3.tar.gz (5.5 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.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fattrace-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c67d40d6fbb071ddfe451dd305083a54195d2894efd4fae380f7b3364113ec0a
MD5 e92a0c1df54fcfa3c0b0c84039b3497a
BLAKE2b-256 ffc125ba986018712878814da74d8557b5241d99a9cf410407abc70a10b8a127

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fattrace-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b49fe8b1108e19f88134c92c0af5934e2d4cd0dc85a234e16f80b759636dd4a3
MD5 731d045cc655e26925c96c32229720ab
BLAKE2b-256 e5de4da931605514eab56b350f3d9cc01d59aef2ede0e42ccb7f2ef072161902

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