Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] Ruby Debugging Article at IBM Developerworks

0 views
Skip to first unread message

pat eyler

unread,
Sep 6, 2005, 12:24:33 PM9/6/05
to
http://www-128.ibm.com/developerworks/edu/os-dw-os-distruby-i.html

The next article is up. (www.bugmenot.com if you don't want to register)

I'm always interested in feedback, if anyone wants to share.

--
thanks,
-pate
-------------------------
We are often unable to tell people what they need to know, because
they want to know something else, and would therefore only
misunderstand what we said
- the Raven (George MacDonald, Lilith)


Florian Groß

unread,
Sep 6, 2005, 3:10:07 PM9/6/05
to
pat eyler wrote:

> http://www-128.ibm.com/developerworks/edu/os-dw-os-distruby-i.html
>
> The next article is up. (www.bugmenot.com if you don't want to register)
>
> I'm always interested in feedback, if anyone wants to share.

Hm, no mention at all of ruby-breakpoint? See
http://ruby-breakpoint.rubyforge.org/

mathew

unread,
Sep 6, 2005, 4:00:36 PM9/6/05
to
pat eyler wrote:
> http://www-128.ibm.com/developerworks/edu/os-dw-os-distruby-i.html
>
> The next article is up. (www.bugmenot.com if you don't want to register)
>
> I'm always interested in feedback, if anyone wants to share.

Something I always want to do is trigger the debugger from the program code.

That is, if I have the source file open in my editor, I'd like to be
able to write something like

trigger_debugger if $DEBUG

at various points in the source, and then run the program with Ruby in
debug mode and have the debugger drop open at the right place. Much
easier than having to set all the breakpoints manually in the debugger.

I'm fairly sure I once read how to do that, but I've been unable to
relocate the information...

Similarly, it would be really useful to be able to start watching
variables from the program code.


mathew
--
<URL:http://www.pobox.com/~meta/>
WE HAVE TACOS

Levin Alexander

unread,
Sep 6, 2005, 4:25:26 PM9/6/05
to
On 9/6/05, mathew <me...@pobox.com> wrote:

> That is, if I have the source file open in my editor, I'd like to be
> able to write something like
>
> trigger_debugger if $DEBUG

$ gem install ruby-breakpoint

require 'rubygems'
require 'breakpoint'

breakpoint if $DEBUG

puts you into an interactive irb session

-Levin

Caleb Clausen

unread,
Sep 6, 2005, 6:42:05 PM9/6/05
to
Levin Alexander wrote:

Or, to stop in the debugger, try this:

defined? DEBUGGER__ and Process.kill("INT",0)


0 new messages