Skip to main content

A Python debugger for learner which print out all changes.

Project description

pdbg.py

Table of Contents

pdbg is a debugging tool for python. It is designed to be a simple and lightweight tool for troubleshooting errors in Python code.

When run, this tool will run the specified script, while outputting all the variable definitions during the run.

All of the functionality of this module is provided through a single function. The options for this function are detailed in the Options section of this document

Installation

You can install pdbg with pip

pip install pdbg-bcit

Usage

Using this tool is very simple. Just open python and import the library and you'll be ready to get started.

import pdbg

pdbg.pdbg(file)

Running the pdbg.pdbg() method will run the script and output all the variable definitions and changes in the targeted file. More options for this method are detailed below.

Options

pdbg.pdbg(file, output_format="{var_name} {{ {pre_value} => {new_value} }}", seperator=", ", var_filter=[], func_filter=[], output_file="")

  • [Required] file
    • Absolute path to your Python script.
  • output_format
    • The format of the output
    • {var_name} will be the name of the variable,
    • {pre-value} will be the initial variable
    • {new_value} will be the variable after changes.
    • Read the Python doc for more about formatting.
  • seperator
    • Seperator used when multiple variables are changed in one line.
  • var_filter
    • Filter the output by variables name.
  • func_filter
    • Filter the output by function name.
  • output_file
    • Defaults to None. Redirect the output of pdbg to a file if specified. Will output by printing in console otherwise

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

pdbg-bcit-0.0.6.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

pdbg_bcit-0.0.6-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

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