[ANN] Ruby Debugging Article at IBM Developerworks

L

Levin Alexander

T24gOS82LzA1LCBtYXRoZXcgPG1ldGFAcG9ib3guY29tPiB3cm90ZToKCj4gVGhhdCBpcywgaWYg
SSBoYXZlIHRoZSBzb3VyY2UgZmlsZSBvcGVuIGluIG15IGVkaXRvciwgSSdkIGxpa2UgdG8gYmUK
PiBhYmxlIHRvIHdyaXRlIHNvbWV0aGluZyBsaWtlCj4gCj4gICAgIHRyaWdnZXJfZGVidWdnZXIg
aWYgJERFQlVHCgokIGdlbSBpbnN0YWxsIHJ1YnktYnJlYWtwb2ludAoKICByZXF1aXJlICdydWJ5
Z2VtcycKICByZXF1aXJlICdicmVha3BvaW50JwoKICBicmVha3BvaW50IGlmICRERUJVRwoKcHV0
cyB5b3UgaW50byBhbiBpbnRlcmFjdGl2ZSBpcmIgc2Vzc2lvbgoKLUxldmluCg==
 
C

Caleb Clausen

Levin said:
$ gem install ruby-breakpoint

require 'rubygems'
require 'breakpoint'

breakpoint if $DEBUG
=20
puts you into an interactive irb session

Or, to stop in the debugger, try this:

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

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top