how to use rdebug in ruby script

R

Roger Pack

how to use rdebug in a pure ruby script file.Please me

I've wondered that myself.
If you're using MRI I'd recommend using 'ruby-debug' gem, then it's like

require 'rubygems'
require 'ruby-debug'
debugger # somewhere in your script
 
M

Marc Weber

how to use rdebug in a pure ruby script file.Please me
require 'rdebug' at the location where you want to start debugging.
That worked for me

Marc Weber
 
R

Roger Pack

require 'rdebug' at the location where you want to start debugging.
That worked for me

Which rdebug is it loading ("gem which rdebug")? My system doesn't seem
to have that file.
When I do a
require 'debug'
it drops me to a console, but then doesn't seem to know how to deal with
the sourcefile right.

E:\dev\ruby\p2pwebclient\final>ruby -v long.rb
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mingw32]
Debug.rb
Emacs support available.

long.rb:3:
(rdb:1) list
[-2, 7] in long.rb
No sourcefile available for long.rb


But maybe that's just a windows thing.
-r
 
M

Marc Weber

Excerpts from Roger Pack's message of Sun Feb 14 04:21:04 +0100 2010:
Which rdebug is it loading ("gem which rdebug")? My system doesn't seem
to have that file.
When I do a
require 'debug'

Sorry, I mixed them up: rdebug is not debug. I was talking about the
require 'debug' only which was good enough for me.

Marc Weber
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,774
Messages
2,569,600
Members
45,179
Latest member
pkhumanis73
Top