From: Zouplaz Date: 2007-10-16T21:05:03+09:00 Subject: How to breakpoint ruby code ? Hello, I would like to know how I can have my ruby code stopped and an irb invoqued which would allow me to have full access to the current context. I've tried this : require 'rubygems' require_gem 'ruby-breakpoint' h2 = Hash.new breakpoint Two things are wrong : 1) after breakpoint the context is lost, and typing h2 gives undefined local variable or method `h2' for # 2) require_gem puts a warning (use gem instead), and using gem 'ruby-breakpoint' makes breakpoint command to be unknown : undefined local variable or method `breakpoint' for main:Object (NameError) Seems I'm on the very wrong way as I presume that debugging/breakpointing is certainly a very common task with Ruby. Thanks Note : In fact, I would like something similar to the Rails console for use with non Rails ruby code.