# Dev-utils/debug question

**URL:** <https://rubytalk.org/t/dev-utils-debug-question/14828>\
**Category:** ruby-talk\
**Created:** [16 November 2004 15:43 UTC](https://rubytalk.org/t/dev-utils-debug-question/14828 "2004-11-16T15:43:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Its\_Me](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@Its\_Me](https://rubytalk.org/u/Its_Me)\
**Post date:** [16 November 2004 15:43 UTC](https://rubytalk.org/t/dev-utils-debug-question/14828/1 "2004-11-16T15:43:18Z")

</div>

Two questions:

- Can explicit breakpoints be leveraged to incrementally patch fixes/changes  
into a running app (during debugging)

- Can it be extended to take an external interrupt of some kind and enter a  
breakpoint?

So far breakpoint has made my working in JEdit without a debugger pretty  
bearable ! thanks a whole bunch, gavin!!

[does anyone have jedit working with ruby debugging?]

---

<div class="post-metadata">

**Author:** ![Florian\_Gross](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@Florian\_Gross](https://rubytalk.org/u/Florian_Gross)\
**Post date:** [16 November 2004 15:48 UTC](https://rubytalk.org/t/dev-utils-debug-question/14828/2 "2004-11-16T15:48:18Z")

</div>

itsme213 wrote:

> Two questions:
> 
> - Can explicit breakpoints be leveraged to incrementally patch fixes/changes  
> into a running app (during debugging)

Sure thing, after all you have a full-fledged irb shell and you can replace methods using it.

> - Can it be extended to take an external interrupt of some kind and enter a  
> breakpoint?

Yup, though it will be a bit harder to get it to run in a specific context. I guess something like trap("SIGUSR1") { breakpoint } might do the trick.

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [16 November 2004 23:28 UTC](https://rubytalk.org/t/dev-utils-debug-question/14828/3 "2004-11-16T23:28:54Z")

</div>

Florian answered these, but were you thinking of any particular way  
dev-utils could be enhanced?

Gavin

> **···**
>
> On Wednesday, November 17, 2004, 2:43:18 AM, itsme213 wrote:
> 
> > Two questions:
> 
> > - Can explicit breakpoints be leveraged to incrementally patch fixes/changes  
> > into a running app (during debugging)
> 
> > - Can it be extended to take an external interrupt of some kind and enter a  
> > breakpoint?

---

<div class="post-metadata">

**Author:** ![Its\_Me](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@Its\_Me](https://rubytalk.org/u/Its_Me)\
**Post date:** [17 November 2004 01:23 UTC](https://rubytalk.org/t/dev-utils-debug-question/14828/4 "2004-11-17T01:23:17Z")

</div>

> Florian answered these, but were you thinking of any particular way  
> dev-utils could be enhanced?

Being able to interrupt a running program and drop into an irb/breakpoint  
session would be nice.

Even nicer would be to have a mode whose possible values include  
DBG\_ON\_BREAKPOINT: in that mode the "breakpoint" (whether hand-inserted or  
by interrupt) drops into a ruby debugger session, not just irb. Any chance  
of that?
