[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rdebug / emacs / gud

Jim Weirich

10/2/2007 3:00:00 PM

I'm trying to run rdebug from within emacs using gud (Grand Unified
Debugger, or something like that).

I see there is a rdebug.el package for this. And using it gives me the
ability to set breakpoints by visiting the source file pressing the
approppriate key bindings, which is nice.

But using GUD in other languages (particularly C) gives more. In
particular, it will display a window containing the file being debugged
and indicate the current line executing.

Currently the rdebug.el package is not doing the dynamic source code
display for me. Is my setup wrong? Is rdebug.el not setup to support
that? Am I missing something?

Thanks.

-- Jim Weirich
--
Posted via http://www.ruby-....

6 Answers

Alex Shulgin

10/2/2007 6:43:00 PM

0

On Oct 2, 6:00 pm, Jim Weirich <j...@weirichhouse.org> wrote:
>
> Currently the rdebug.el package is not doing the dynamic source code
> display for me. Is my setup wrong? Is rdebug.el not setup to support
> that? Am I missing something?

Probably. I have no problem debugging ruby code with my setup:

Debian/lenny (testing)
emacs22.1+1-2
ruby1.8-elisp version 1.8.6.36-3


--
Cheers,
Alex

Jim Weirich

10/3/2007 1:54:00 AM

0

Alex Shulgin wrote:
> Probably. I have no problem debugging ruby code with my setup:

Thanks. Just to be clear, "no problem" means that you *are* getting the
live source update, right?

> Debian/lenny (testing)
> emacs22.1+1-2
> ruby1.8-elisp version 1.8.6.36-3

(interesting ... what is the -elisp designation on your ruby version
imply?)

I should have listed my system specs too.

MacOS 10.4.10
GNU Emacs 22.1.1 (i386-apple-darwin8.10.1, Aquamacs Distribution 1.1)
(also GNU Emacs 22.1.1 (i386-apple-darwin8.9.1))
Ruby 1.8.5 [i686-darwin8.8.1]

Also tried on:

Linux/Debian (Linux li19-167)
GNU Emacs 22.1.1 (i486-pc-linux-gnu)
ruby 1.8.6 [i686-linux]

Thanks for the feedback.

-- Jim Weirich
--
Posted via http://www.ruby-....

Alex Shulgin

10/3/2007 9:01:00 AM

0

On Oct 3, 4:53 am, Jim Weirich <j...@weirichhouse.org> wrote:
> Alex Shulgin wrote:
> > Probably. I have no problem debugging ruby code with my setup:
>
> Thanks. Just to be clear, "no problem" means that you *are* getting the
> live source update, right?

Right. :-)

> > Debian/lenny (testing)
> > emacs22.1+1-2
> > ruby1.8-elisp version 1.8.6.36-3
>
> (interesting ... what is the -elisp designation on your ruby version
> imply?)

ruby1.8-elisp is a Debian package which adds Emacs Lisp scripts for
ruby editing and debugging to emacsen (XEmacs or GNU Emacs). The ruby
itself is 1.8.6, I should have listed it too...

> I should have listed my system specs too.
>
> MacOS 10.4.10
> GNU Emacs 22.1.1 (i386-apple-darwin8.10.1, Aquamacs Distribution 1.1)
> (also GNU Emacs 22.1.1 (i386-apple-darwin8.9.1))
> Ruby 1.8.5 [i686-darwin8.8.1]
>
> Also tried on:
>
> Linux/Debian (Linux li19-167)
> GNU Emacs 22.1.1 (i486-pc-linux-gnu)
> ruby 1.8.6 [i686-linux]

May be you are missing the very ruby-elisp files or you have some
version conflict (*.el files vs. ruby or *.el files vs Emacs). :-)


--
Alex

Jim Weirich

10/4/2007 1:25:00 AM

0

Alex Shulgin wrote:
> May be you are missing the very ruby-elisp files or you have some
> version conflict (*.el files vs. ruby or *.el files vs Emacs). :-)

Found the problem: The regexp used to filter the output of rdebug to
determine the source code line was not correct.

Original Version: "\\([^:\n]*\\):\\([0-9]+\\):.*\n"

Fixed Version: "^Z^Z\\([^:\n]*\\):\\([0-9]+\\).*\n"

(yes, the first two character of the regexp are control-Z)

That fixed it for me. I added the control z's and removing the second
colon and now everything is working fine. This leads me to suspect that
the ruby-debug gem and the rdebug.el emacs file are out of sync.

My ruby-debug gem is version 0.9.3. There are no version markings in
the rdebug.el file.

-- Jim Weirich
--
Posted via http://www.ruby-....

Rocky Bernstein

11/26/2007 12:24:00 AM

0

My apologies for not seeing this sooner. It has come to my attention
that there is a rdebug.el distributed with Ruby 1.8.6.

Independently I had been writing/revising my own rdebug.el. and it's now
in ruby-debug's SVN in the emacs directory. Had I known there was
another rdebug.el around, I think I would have tried to avoid that
confusion.

The rdebug.el in SVN a bit more filled out. It probably can be used with
0.9.3 (since I started writing it in that release). But it really should
be used with the ruby-debug that is in SVN since rdebug now supports
gdb-style annotations. Also the rdebug.el in SVN probably should be used
with Emacs 23. (It might however work in Emacs 22).

I'll write to the author of the other rdebug.el to see what we can do.
Perhaps this can be used to support older Emacs versions.

As for getting this cleared up so in Ruby 1.8.7, I'm kind of new to this
and would appreciate suggestions. At a minimum I will post a tracker
ticket.

My apologies for the confusion.

Jim Weirich wrote:
> Alex Shulgin wrote:
>> May be you are missing the very ruby-elisp files or you have some
>> version conflict (*.el files vs. ruby or *.el files vs Emacs). :-)
>
> Found the problem: The regexp used to filter the output of rdebug to
> determine the source code line was not correct.
>
> Original Version: "\\([^:\n]*\\):\\([0-9]+\\):.*\n"
>
> Fixed Version: "^Z^Z\\([^:\n]*\\):\\([0-9]+\\).*\n"
>
> (yes, the first two character of the regexp are control-Z)
>
> That fixed it for me. I added the control z's and removing the second
> colon and now everything is working fine. This leads me to suspect that
> the ruby-debug gem and the rdebug.el emacs file are out of sync.
>
> My ruby-debug gem is version 0.9.3. There are no version markings in
> the rdebug.el file.
>
> -- Jim Weirich

--
Posted via http://www.ruby-....

Rocky Bernstein

11/26/2007 12:37:00 AM

0

One other thing I forgot to mention. It was not clear to me which rdebug
was getting referred to. Probably not the one I have been using (since
it works just fine). The other rdebug.el which is distributed in the
misc directory of Ruby 1.8.6 is by Martin Nordholts <enselic@...>

I've added an SVN $Id$ line in the rdebug.el in ruby-debug's SVN, so
hopefully this will reduce confusion in the future.


Rocky Bernstein wrote:
> My apologies for not seeing this sooner. It has come to my attention
> that there is a rdebug.el distributed with Ruby 1.8.6.
>
> Independently I had been writing/revising my own rdebug.el. and it's now
> in ruby-debug's SVN in the emacs directory. Had I known there was
> another rdebug.el around, I think I would have tried to avoid that
> confusion.
>
> The rdebug.el in SVN a bit more filled out. It probably can be used with
> 0.9.3 (since I started writing it in that release). But it really should
> be used with the ruby-debug that is in SVN since rdebug now supports
> gdb-style annotations. Also the rdebug.el in SVN probably should be used
> with Emacs 23. (It might however work in Emacs 22).
>
> I'll write to the author of the other rdebug.el to see what we can do.
> Perhaps this can be used to support older Emacs versions.
>
> As for getting this cleared up so in Ruby 1.8.7, I'm kind of new to this
> and would appreciate suggestions. At a minimum I will post a tracker
> ticket.
>
> My apologies for the confusion.
>
> Jim Weirich wrote:
>> Alex Shulgin wrote:
>>> May be you are missing the very ruby-elisp files or you have some
>>> version conflict (*.el files vs. ruby or *.el files vs Emacs). :-)
>>
>> Found the problem: The regexp used to filter the output of rdebug to
>> determine the source code line was not correct.
>>
>> Original Version: "\\([^:\n]*\\):\\([0-9]+\\):.*\n"
>>
>> Fixed Version: "^Z^Z\\([^:\n]*\\):\\([0-9]+\\).*\n"
>>
>> (yes, the first two character of the regexp are control-Z)
>>
>> That fixed it for me. I added the control z's and removing the second
>> colon and now everything is working fine. This leads me to suspect that
>> the ruby-debug gem and the rdebug.el emacs file are out of sync.
>>
>> My ruby-debug gem is version 0.9.3. There are no version markings in
>> the rdebug.el file.
>>
>> -- Jim Weirich

--
Posted via http://www.ruby-....