A helpful debug tracer exception i spun together with GPT, not too bad not too good.
Project description
debug-tracer
not the best not the worst ig
Usage:
import debug_tracer
tracer = debug_tracer.DebugTracer("Initial message")
tracer.trace("hmm")
print("and execution is unhindered!")
Example traceback:
/home/glitchy/PycharmProjects/DebugTracer/src/main.py:51: DebugTracer:
==================== DEBUG TRACE ====================
Timestamp: 2025-03-24 19:51:43
Function: example_function
Line: 126
--------------------------------------------------------
Message: This is a debug trace
Arguments: 10, 20, SomeComplexClass{
"details": {
"field1": "value1",
"field2": "value2",
"field3": "value3",
"field4": "value4",
"field5": "value5"
},
"large_data": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
"truncated"
],
"name": "ComplexObject"
}
--------------------------------------------------------
Local Variables:
{
"args": "(10, 20, <__main__.SomeComplexClass object at 0x7685849c1a90>)",
"message": "This is a debug trace"
}
--------------------------------------------------------
Environment Info:
Python Version: 3.13.2
OS: Linux-6.13.7-zen1-1-zen-x86_64-with-glibc2.41
========================================================
File "/home/glitchy/PycharmProjects/DebugTracer/src/main.py", line 129, in <module>
example_function()
File "/home/glitchy/PycharmProjects/DebugTracer/src/main.py", line 126, in example_function
tracer.trace("This is a debug trace", x, y, complex_obj)
File "/home/glitchy/PycharmProjects/DebugTracer/src/main.py", line 28, in trace
tb = self.get_traceback()
File "/home/glitchy/PycharmProjects/DebugTracer/src/main.py", line 99, in get_traceback
return traceback.format_stack()
======================= END TRACE ======================
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
debug_tracer-0.1.0.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file debug_tracer-0.1.0.tar.gz.
File metadata
- Download URL: debug_tracer-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a2af579c8e36d75276c2bdc26287c4d5d0b690ed05fe98f3a68a2bf9cb5201d
|
|
| MD5 |
37e32c48a9ea73aa2777e94c0c6ca4e4
|
|
| BLAKE2b-256 |
626d76d683c73df8ea5048a86ec4cfc5b17ce83bc39b3495ac1390a3973c7d2a
|
File details
Details for the file debug_tracer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: debug_tracer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6cca825266190587bf656ef352dc87180d79f2f6cdc50d17564cd2067181105
|
|
| MD5 |
00cadc63b22d6fca7d236e1c2de5346f
|
|
| BLAKE2b-256 |
767b7628901361bdd429917b704d77e66a034d7ca06f2fbda6e2856510f33aa8
|