Skip to content

Experiments on how to display variables from pry sessions in another window.

Notifications You must be signed in to change notification settings

rathrio/pry-debug-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Pry Debug Hooks

Experiments on how to display variables from pry sessions in another window.

It currently works by dumping some pry command outputs to a custom file, e.g. ~/.pry_locals for the Pry::Command::Ls::LocalVars command, and having another process watch and read from that file to display it in another window.

Demo

Prerequisites

Installation

  1. Copy the contents from hooks.rb to ~/.pryrc or require the file from within ~/.pryrc.
  2. Copy pry-watch-locals to somewhere in your path or link to it, e.g. ln -sr pry-watch-locals /usr/local/bin/pry-watch-locals

Usage

  1. Launch pry-watch-locals in some other terminal window / split / tmux pane / whatever.
  2. Launch a pry session and play around.

Note that this will result in a text file at ~/.pry_locals that will be overwritten on consecutive variable dumps.

Todos

  • Easier installation (can this be shipped as a Pry plugin?)
  • Dump non-local vars as well

About

Experiments on how to display variables from pry sessions in another window.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published