A tool for running Python scripts line by line with error handling and reporting.
Project description
Tracor
🚀 Debug Python Scripts Faster
This utility script allows you to execute a Python script line by line, catch any errors that occur along the way, and provide essential debugging information with enhanced context. Additionally, it generates a well-formatted Markdown report highlighting the errors encountered during execution.
Features
- Executes a Python script line by line.
- Catches and logs errors with detailed context and colored output for better readability.
- Generates a Markdown report summarizing the errors.
- Allows customizable colors for different parts of the error messages.
- Supports stopping execution on the first error or after a specified number of errors.
- Includes options to show full tracebacks in the Markdown report.
Usage
Basic Usage
python main.py <script_path>
Usage With Flags
--stop-on-error: Stop execution on the first error.--output-file <file>: Specify the output Markdown file for the error report.--log-level <level>: Set the logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL).--max-errors <n>: Limit the number of errors to report before stopping execution.--show-traceback: Include full traceback in the Markdown report.--execution-color <color>: Color for executed lines (default: GREEN).--error-color <color>: Color for error lines (default: RED).--code-color <color>: Color for code in error messages (default: YELLOW).--type-color <color>: Color for error type in error messages (default: CYAN).--message-color <color>: Color for error message in error messages (default: MAGENTA).--traceback-color <color>: Color for traceback in error messages (default: WHITE).
Output
Terminal Output
The terminal output will show the execution of each line and any errors encountered with enhanced multi-colored highlighting for better readability.
Markdown Report
A well-formatted Markdown report summarizing the errors will be generated. The report includes:
A summary section with the total number of errors. A detailed table with line numbers, code snippets, error types, error messages, and tracebacks.
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
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 tracor-0.1.0.tar.gz.
File metadata
- Download URL: tracor-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8df4454d555542f82fedc64204c8ac41b282795dedce361e6057d9fa3c51e3ce
|
|
| MD5 |
a59c1fe8f07741444941d9545a064a3a
|
|
| BLAKE2b-256 |
eb230dc388b67ac60bf165b2743928db89eec38f4c0daee11d91f87a6c353722
|
File details
Details for the file tracor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tracor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45d113be31663762cf7a5ad678cbeb44b89cbe90608aa119501cf520a245c6a2
|
|
| MD5 |
ca1b3bb82da209b0333cd109340b34a4
|
|
| BLAKE2b-256 |
4e930abf1bd0ba8fb1a1f7c5ab8e49808c270eab7e786189fadc2fe56880ea0c
|