Using the Ruby debugger with 1.8, breakpoints are ignored. Breakpoints are
working with 1.6.x. Does anyone know what is causing this, and/or whether
anyone is working on fixing the problem?
···
–
Seth Kurtzberg
M. I. S. Corp.
480-661-1849 seth@cql.com
In message “Debugger Not Working” on 03/02/25, Seth Kurtzberg seth@cql.com writes:
Using the Ruby debugger with 1.8, breakpoints are ignored. Breakpoints are
working with 1.6.x. Does anyone know what is causing this, and/or whether
anyone is working on fixing the problem?
Which 1.8? I remember 1.8.0-preview1 had that problem I already
fixed. Forget about preview1. That was just a landmark. Try the
latest HEAD from CVS.
From: Seth Kurtzberg [mailto:seth@cql.com]
Sent: Tuesday, February 25, 2003 1:08 AM
Using the Ruby debugger with 1.8, breakpoints are ignored.
Breakpoints are
working with 1.6.x. Does anyone know what is causing this,
and/or whether
anyone is working on fixing the problem?
Is your bp-problem like as follows?
nakahiro@RUBY ~/test
$ cat foo.rb
p 1
p 2
nakahiro@RUBY ~/test
$ ruby -rdebug foo.rb
Debug.rb
Emacs support available.
foo.rb:1:p 1
(rdb:1) break 2
Set breakpoint 1 at foo.rb:2
(rdb:1) cont
1
Breakpoint 1, toplevel at foo.rb:2
foo.rb:2:p 2
(rdb:1) finish
2
nakahiro@RUBY ~/test
$ ruby -rdebug …/test/foo.rb # Same file
Debug.rb
Emacs support available.
…/test/foo.rb:1:p 1
(rdb:1) break 2
Set breakpoint 1 at …/test/foo.rb:2
(rdb:1) cont
1
2 # !!! Should break before this line !!!
CVS head has the same problem. I’ve installed head from last Friday. I
verified with several other 1.8 head users that they see the same problem.
···
On Monday 24 February 2003 09:45 am, Yukihiro Matsumoto wrote:
Hi,
In message “Debugger Not Working” > > on 03/02/25, Seth Kurtzberg seth@cql.com writes:
Using the Ruby debugger with 1.8, breakpoints are ignored. Breakpoints
are working with 1.6.x. Does anyone know what is causing this, and/or
whether anyone is working on fixing the problem?
Which 1.8? I remember 1.8.0-preview1 had that problem I already
fixed. Forget about preview1. That was just a landmark. Try the
latest HEAD from CVS.
matz.
–
Seth Kurtzberg
M. I. S. Corp.
480-661-1849 seth@cql.com
It is working now with line numbers. What is the syntax for breaking at a
method? That isn’t working but I may not be using the correct syntax.
···
On Tuesday 25 February 2003 06:36 pm, NAKAMURA, Hiroshi wrote:
Hi, Seth,
From: Seth Kurtzberg [mailto:seth@cql.com]
Sent: Tuesday, February 25, 2003 1:08 AM
Using the Ruby debugger with 1.8, breakpoints are ignored.
Breakpoints are
working with 1.6.x. Does anyone know what is causing this,
and/or whether
anyone is working on fixing the problem?
Is your bp-problem like as follows?
nakahiro@RUBY ~/test
$ cat foo.rb
p 1
p 2
nakahiro@RUBY ~/test
$ ruby -rdebug foo.rb
Debug.rb
Emacs support available.
foo.rb:1:p 1
(rdb:1) break 2
Set breakpoint 1 at foo.rb:2
(rdb:1) cont
1
Breakpoint 1, toplevel at foo.rb:2
foo.rb:2:p 2
(rdb:1) finish
2
nakahiro@RUBY ~/test
$ ruby -rdebug …/test/foo.rb # Same file
Debug.rb
Emacs support available.
…/test/foo.rb:1:p 1
(rdb:1) break 2
Set breakpoint 1 at …/test/foo.rb:2
(rdb:1) cont
1
2 # !!! Should break before this line !!!
nakahiro@RUBY ~/test
$
I fixed it in CVS last night. Would you try it?
Regards,
// NaHi
–
Seth Kurtzberg
M. I. S. Corp.
480-661-1849 seth@cql.com
It is working now with line numbers. What is the syntax for
breaking at a method?
Does “(filename:)method_name” not work for you?
nakahiro@RUBY ~/test
$ cat foo.rb
def foo
bar
end
def bar
:bar
end
p foo
nakahiro@RUBY ~/test
$ ruby -rdebug foo.rb
Debug.rb
Emacs support available.
foo.rb:1:def foo
(rdb:1) break …/test/foo.rb:foo
Set breakpoint 1 at foo.rb:foo
(rdb:1) break bar
Set breakpoint 2 at foo.rb:bar
(rdb:1) cont
Breakpoint 1, foo at foo.rb:foo
foo.rb:1:def foo
(rdb:1) cont
Breakpoint 2, bar at foo.rb:bar
foo.rb:5:def bar
(rdb:1) finish
:bar
It is working now with line numbers. What is the syntax for
breaking at a method?
Does “(filename:)method_name” not work for you?
nakahiro@RUBY ~/test
$ cat foo.rb
def foo
bar
end
def bar
:bar
end
p foo
nakahiro@RUBY ~/test
$ ruby -rdebug foo.rb
Debug.rb
Emacs support available.
foo.rb:1:def foo
(rdb:1) break …/test/foo.rb:foo
Set breakpoint 1 at foo.rb:foo
(rdb:1) break bar
Set breakpoint 2 at foo.rb:bar
(rdb:1) cont
Breakpoint 1, foo at foo.rb:foo
foo.rb:1:def foo
(rdb:1) cont
Breakpoint 2, bar at foo.rb:bar
foo.rb:5:def bar
(rdb:1) finish
:bar
nakahiro@RUBY ~/test
$
Regards,
// NaHi
–
Seth Kurtzberg
M. I. S. Corp.
480-661-1849 seth@cql.com
“in” is usually the method name, “at” is a particular line. However, my
preference if possible is to just use “break” for both with the syntax
implying the breakpoint type.
For consistency, I would use ClassName::method_name, which matches other class
qualifiers such as ClassName::CONSTANT or similar structures. The other
alternative is, I guess, ClassName.method_name, but that might be confusing
as in other contexts that implies a static method.
···
On Wednesday 26 February 2003 12:34 am, NAKAMURA, Hiroshi wrote:
Currently, Class:Method catch both class method and instance method.
For other singlethon methods, object:method is available if simple
string representation is avalable, e.g.
-e:1:def self.foo; end; self.foo
(rdb:1) b main:foo
Set breakpoint 1 at main:foo
(rdb:1) c
Breakpoint 1, foo at main:foo
-e:1:def self.foo; end; self.foo
(rdb:1) c
%
With the attached patch, you can use new pattern:
b object.method
matz.
— lib/debug.rb 25 Feb 2003 14:11:40 -0000 1.36
+++ lib/debug.rb 26 Feb 2003 08:24:21 -0000
@@ -160,6 +160,5 @@ class Context
val = eval(str, binding)
stdout.printf "Set breakpoint %d at %s.%s\n", break_points.size, file, pos
···
In message “Re: Debugger Not Working” on 03/02/26, nobu.nokada@softhome.netnobu.nokada@softhome.net writes:
+
when /^\s*b(?:reak)?\s+(?:(.+):)?(.+)$/
@@ -711,3 +716,4 @@ EOHELP
if check_break_points(file, id.id2name, binding, id) or
Currently, Class:Method catch both class method and instance method.
For other singlethon methods, object:method is available if simple
string representation is avalable, e.g.
Except that there is a bug and currently Class:Method actually catches neither, not both.
···
On Wednesday 26 February 2003 01:25 am, Yukihiro Matsumoto wrote:
-e:1:def self.foo; end; self.foo
(rdb:1) b main:foo
Set breakpoint 1 at main:foo
(rdb:1) c
Breakpoint 1, foo at main:foo
-e:1:def self.foo; end; self.foo
(rdb:1) c
%
With the attached patch, you can use new pattern:
b object.method
matz.
— lib/debug.rb 25 Feb 2003 14:11:40 -0000 1.36
+++ lib/debug.rb 26 Feb 2003 08:24:21 -0000
@@ -160,6 +160,5 @@ class Context
val = eval(str, binding)