Meta tags:
description= On the Internet, nobody knows you’re a dog. .;
Headings (most frequently used words):
pry, remote, archives, like, dream, of, banister, fiend, top, posts, the, ecosystem, debugging, sessions, error, consoles, what, next, for, we, need, your, help, categories, meta, calendar, blogroll, nav, stack_explorer, em, exception_explorer, plymouth,
Text of the page (most frequently used words):
the (80), pry (70), and (32), #remote (24), for (20), ruby (18), you (15), with (14), can (12), this (11), 2008 (10), end (10), like (8), exception_explorer (8), stack (8), project (7), debugging (7), frame (7), also (7), binding (7), wordpress (6), your (6), next (6), has (6), user (6), sessions (6), ecosystem (6), session (6), use (6), call (6), exception (6), server (6), com (5), february (5), debugger (5), year (5), plugins (5), plymouth (5), error (5), from (5), site (4), dream (4), banister (4), fiend (4), august (4), october (4), november (4), 2009 (4), january (4), 2010 (4), over (4), help (4), will (4), even (4), but (4), out (4), rspec (4), support (4), other (4), class (4), using (4), all (4), that (4), debug (4), state (4), gem (4), connect (4), foo (4), start (4), into (4), nav (4), log (3), have (3), now (3), 2012 (3), archives (3), programming (3), work (3), core (3), there (3), multi (3), functionality (3), development (3), point (3), more (3), name (3), just (3), what (3), intercept (3), klass (3), its (3), code (3), console (3), when (3), test (3), starts (3), very (3), example (3), context (3), instance (3), another (3), exceptions (3), some (3), level (3), line (3), program (3), was (3), require (3), def (3), run (3), same (3), two (3), method (3), hello (3), irb (3), get (2), started (2), sign (2), subscribed (2), subscribe (2), account (2), blog (2), september (2), december (2), 2011 (2), feb (2), 2026 (2), comments (2), feed (2), entries (2), create (2), last (2), would (2), through (2), only (2), rate (2), make (2), full (2), are (2), reality (2), need (2), repl (2), smalltalk (2), few (2), integration (2), live (2), libraries (2), soon (2), message (2), illustrates (2), following (2), failing (2), tests (2), specialized (2), current (2), itself (2), useful (2), argumenterror (2), myclass (2), mycallingclass (2), below (2), assertion (2), raised (2), parent (2), should (2), simple (2), sophisticated (2), entire (2), command (2), available (2), avdi (2), one (2), attempt (2), hammertime (2), post (2), their (2), them (2), interactive (2), executable (2), initialize (2), new (2), about (2), opens (2), variant (2), alternative (2), adds (2), allows (2), multiple (2), then (2), remote_pry (2), normal (2), drb (2), library (2), instances (2), running (2), such (2), main (2), show (2), frames (2), plugin (2), commands (2), stack_explorer (2), step (2), any (2), top (2), internet (2), nobody (2), knows (2), dog (2), design, collapse, bar, manage, subscriptions, view, reader, report, content, privacy, already, org, blogroll, calendar, meta, metaprogramming, assembly, categories, older, tags, posted, thank, everyone, who, used, contributed, hope, better, see, come, fruition, please, too, busy, might, consider, making, team, small, much, bit, funding, develop, faster, higher, degree, polish, alternatively, company, sponsor, arrangements, contact, maintainer, monetary, donation, issues, been, huge, amount, made, good, progress, ultimate, goal, driven, language, close, model, implementing, gui, front, projects, described, above, represent, generous, slice, universe, still, lot, expanding, impressive, bash, alias, rails, syntax, highlighting, currently, supports, bacon, minitest, coming, expectations, expectationnotmeterror, true, else, false, skip_until, examplegroup, nested, power, implemented, api, fact, required, designed, fails, immediately, failure, execute, figure, wrong, edit, fix, failed, text, editor, proven, often, obviating, real, quick, demo, action, check, read, information, wiki, miniscreencast, is_a, prev, configure, feature, ability, define, exactly, which, captured, specifying, rudimentary, provided, activated, switch, raises, intercepts, where, access, furthermore, walk, backtrace, evaluating, arbitrary, each, isolate, precise, cause, version, intercepting, failures, called, nifty, bring, discussed, grimm, lisp, communities, great, tools, instead, allowing, programs, die, rescued, environments, present, give, opportunity, correct, problem, consoles, similar, remote_pry_em, excited, possibilities, exploration, well, educational, applications, fun, interact, programmers, environment, could, easily, base, war, eventmachine, based, authentication, ssl, along, tab, completion, paging, clients, servers, computer, within, process, set, follows, uses, versions, implementations, simply, replace, await, connections, client, connects, implement, newer, ambitious, important, those, socket, particularly, places, not, normally, possible, apps, web, door, exotica, pow, while, these, gems, powerful, may, find, yourself, needing, embed, showing, accessible, total, gamma, beta, alpha, implements, side, coin, navigation, provides, move, examine, evaluate, down, enabling, perform, object, continue, after, requiring, placing, wherever, want, advance, execution, however, recent, transformed, featured, aside, primary, case, hasn, facilities, style, limited, examining, snapshots, around, roughly, ago, wrote, introducing, world, back, different, creature, runtime, added, extras, passed, grown, single, variety, spinoffs, describe, provide, brief, synopsis, chart, course, future, first, article, select, month, dupping, our, way, eval, updating, extension, wtf, infinite, ranges, devil, image, controlling, variable, scope, baking, module, methods, classes, alias_method, behavior, yield, define_method, turning, head, posts,
Text of the page (random words):
like dream of banister fiend on the internet nobody knows you re a dog like dream of banister fiend on the internet nobody knows you re a dog about top posts the pry ecosystem turning irb on its head with pry what is the ruby top level behavior of yield in define_method baking module methods into classes with alias_method controlling variable scope in ruby 1 9 the devil image library for ruby wtf infinite ranges in ruby updating a c extension for ruby 1 9 1 dupping our way out of instance eval archives archives select month february 2012 1 january 2011 1 november 2010 3 january 2010 1 october 2009 2 february 2009 1 december 2008 2 november 2008 2 october 2008 2 september 2008 1 august 2008 5 february 14 2012 the pry ecosystem roughly a year ago i wrote my first article introducing pry to the ruby world back then pry was a very different creature just a simple runtime variant of irb with a few added extras in the year that s passed pry has grown from a single project into an ecosystem with a variety of plugins and spinoffs in this post i ll describe the current state of the pry ecosystem provide a brief synopsis of some of the plugins available and attempt to chart the course of future development debugging aside from its use as an irb alternative pry s other primary use case is as a debugger the pry gem by itself hasn t any facilities for a ruby debug style next or step so any debugging was limited to examining program snapshots around the binding pry call now however two recent plugins pry nav and pry stack_explorer have transformed pry into a full featured debugger pry nav this plugin adds the next step and continue commands to pry after requiring this gem you can use pry as normal placing binding pry wherever you want to start your session the next command will advance execution by one line 1 pry main 0 next from y rb line 5 in object hello 1 require pry nav 2 3 def hello 4 binding pry 5 x 20 6 end 7 8 hello pry nav also has support for pry remote enabling you to perform remote debugging pry stack_explorer this plugin implements the other side of the debugging coin call stack navigation it provides the show stack frame up and down commands from the point a pry session is started you can move up the call stack through parent stack frames examine state and even evaluate code 2 pry main 0 show stack showing all accessible frames in stack 5 in total 0 method gamma 1 method beta 2 method alpha while these two gems create a powerful debugger you may at some point find yourself needing to use ruby debug if so you can embed pry into it with the ruby debug pry gem remote sessions remote sessions are another important development in the pry ecosystem a remote session allows you to start instances of pry in a running program and connect to those instances over a socket this is particularly useful for using pry in places not normally possible such as apps running on the pow web server it also opens the door for such exotica as multi user sessions pry has two plugins that implement remote sessions pry remote and the newer and more ambitious pry remote em pry remote pry remote uses the drb library and should work on all ruby versions and implementations to use it simply replace the normal binding pry call with binding remote_pry as the example below illustrates a drb server will await connections and a remote session will start as soon as a client connects we set up the server as follows require pry remote class foo def initialize x y binding remote_pry end end foo new 10 20 we can then connect to it using the pry remote executable pry remote em pry remote em is a sophisticated eventmachine based alternative to pry remote it adds user authentication and ssl support along with tab completion and paging it also allows multiple clients to connect to the same server and multiple servers to run on the same computer and even within the same process i m very excited about pry remote em as it opens up possibilities for multi user remote debugging and exploration as well as educational applications it is also just fun to interact with other programmers in a live environment for example a ruby variant of core war could easily run on the pry remote em base to start the pry remote em server require pry remote em server class foo def initialize x y binding remote_pry_em end end em run foo new 10 20 and similar to pry remote we connect using the pry remote em executable error consoles as discussed in avdi grimm s blog post hammertime an interactive error console for ruby the lisp and smalltalk communities have great tools for debugging exceptions instead of allowing their programs to die from an un rescued exception their programming environments present them with an interactive console and give them an opportunity to correct the problem avdi s nifty hammertime gem is one attempt to bring this functionality to ruby pry exception_explorer is another a specialized version of pry exception_explorer for intercepting test failures called plymouth is also available pry exception_explorer when your program raises an exception pry exception_explorer intercepts it and starts a pry session in the context where the exception was raised the user has access to all state at the error site furthermore the user can walk up the exception s entire backtrace evaluating arbitrary code at each level to isolate the precise cause of the error another feature of pry exception_explorer is the ability to define exactly which exceptions should be captured this can be as simple as specifying an exception class or as sophisticated as an assertion over the entire state of the call stack rudimentary support for some c level exceptions is also provided and activated with a command line switch in the example below we configure a call stack assertion so that pry starts when an argumenterror is raised but only if the exception context is an instance of myclass and the parent s context is an instance of mycallingclass ee intercept do frame ex ex is_a argumenterror frame klass myclass frame prev klass mycallingclass end pry exception_explorer has proven itself to be very useful often obviating the need for a real debugger for a quick demo of it in action check out the following miniscreencast and read the project wiki for more information plymouth plymouth is a specialized error console designed to help debug failing tests when a test fails a pry session starts immediately at the site of the failure you can execute ruby in the repl to figure out what s wrong and you can also use edit current to fix the failed test in your text editor plymouth illustrates the power of pry exception_explorer its functionality is implemented using the pry exception_explorer api in fact the following code is all that s required to intercept failing tests on rspec ee intercept do frame ex if ex class name rspec expectations expectationnotmeterror message ex message true else false end end skip_until do frame frame klass name rspec core examplegroup nested end plymouth currently supports the rspec bacon and minitest libraries support for other libraries is coming soon what s next for pry the projects described above represent a generous slice of the pry universe but there s still a lot more out there plugins for live syntax highlighting rails integration and bash alias integration to name just a few the pry ecosystem is expanding at an impressive rate the ultimate goal of the pry project is to make repl driven development a reality for the ruby language and to get as close to the smalltalk model as we can even to the point of implementing a gui front end for pry we need your help pry has been a huge amount of work over the last year or so but we ve made good progress multi user pry sessions full debugging functionality and remote sessions are now a reality if you would like to see the pry project come to fruition please help us work through the issues if you re too busy you might consider making a monetary donation the core team is small and there s only so much we can do but with a bit of funding the project can develop at a faster rate and with a higher degree of polish alternatively if your company would like to sponsor the project you can contact the project maintainer to make arrangements i d like to thank everyone who s used and contributed to pry over the last year with your help i hope this next year will be even better posted in programming pry ruby 12 comments tags debugger pry ruby older entries august 2026 m t w t f s s 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 feb categories assembly c metaprogramming programming pry ruby meta create account log in entries feed comments feed wordpress com calendar august 2026 m t w t f s s 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 feb archives february 2012 january 2011 november 2010 january 2010 october 2009 february 2009 december 2008 november 2008 october 2008 september 2008 august 2008 blogroll wordpress com wordpress org blog at wordpress com subscribe subscribed like dream of banister fiend sign me up already have a wordpress com account log in now privacy like dream of banister fiend subscribe subscribed sign up log in report this content view site in reader manage subscriptions collapse this bar design a site like this with wordpress com get started
|