pdb

Simple print debugging

Installation

Add this line to your application's Gemfile:

gem 'pdb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pdb

Usage

require 'pdb'
@pdb = true

class Maths
  include Pdb

  def self.adder(n, k)
    debug "adder values", [n, k]
    s = n + k
  end 
end

Maths.adder(2, 3)
=> "== DEBUG: adder values"
   "[2, 3]"
   5 

Laundry List

  • Build tests
  • Port debug code from delayed po processor library
  • Add awesome_print support
  • Add inspect option