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)
> 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/
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
> 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
Or, to stop in the debugger, try this:
defined? DEBUGGER__ and Process.kill("INT",0)