Z
Zouplaz
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 #<Object:0xb7f8d9fc
@__bp_file="./test.rb", @__bp_line=21>
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.
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 #<Object:0xb7f8d9fc
@__bp_file="./test.rb", @__bp_line=21>
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.