Skip to main content

A time-travel debugger for Python with step-backward execution.

Project description

Time-Travel Debugger 🚀

A Python library that allows step-backward debugging, making debugging more visual and interactive. This tool helps developers inspect past states of their program without restarting execution, enabling efficient debugging.

📌 How This Idea Came to Mind

While solving problems on LeetCode, I often performed dry runs to manually track variable changes. I realized that a tool that could rewind execution steps and visually display variable changes would make debugging much easier. This led me to create Time-Travel Debugger—a library that allows developers to step backward and forward in execution history seamlessly.

✨ Features

  • Step forward and backward through execution history.
  • View variable changes at each step.
  • Set breakpoints for controlled debugging.
  • Interactive CLI mode with visual debugging powered by rich.

🔧 Installation

pip install time-travel-debugger

🚀 Usage

from time_travel_debugger import TimeTravelDebugger

def sample_function():
    a = 10
    b = a + 5
    c = b * 2
    d = c - 3
    print("Final result:", d)

# Initialize debugger
debugger = TimeTravelDebugger()

debugger.start_debugging(sample_function)

debugger.debugger_cli()

🛠️ Debugging Commands

Command Description
f Step forward to the next execution state
b Step backward to the previous state
q Quit the debugger

📜 License

This project is licensed under the MIT License.

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

time-travel-debugger-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

time_travel_debugger-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file time-travel-debugger-0.1.1.tar.gz.

File metadata

  • Download URL: time-travel-debugger-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for time-travel-debugger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bfd12836ac488b2cda48248af589b2fe8bfae3edb80d1cf647426f9729aec7e6
MD5 43eb2cbe2111a6881b39df6f8e7b400c
BLAKE2b-256 13ee03966d4479ff48135a6e383de97a6db047c3c4df5a1a37e73c207fd682e2

See more details on using hashes here.

File details

Details for the file time_travel_debugger-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for time_travel_debugger-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 713888b34b6e7a8b592d7b074843cd87c0d4292ec0b0fe1cca0425b818bcf330
MD5 ae5be08cf8867840c61ae36b4a8f1c1c
BLAKE2b-256 4df91a900ad5a5c7740b50798bf8de23d33a2771330fda167b7352fc6a8b24c1

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