Created
January 23, 2013 00:42
-
-
Save duncan-bayne/4600539 to your computer and use it in GitHub Desktop.
Setting a breakpoint from within the Ruby debugger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat test.rb | |
class Foo | |
def bar | |
'baz' | |
end | |
end | |
debugger | |
Foo.new.bar | |
$ be rdebug test.rb | |
[-4, 5] in /Users/dev/Dropbox/repos/atlas/test.rb | |
=> 1 class Foo | |
2 def bar | |
3 'baz' | |
4 end | |
5 end | |
/Users/dev/Dropbox/repos/atlas/test.rb:1 | |
class Foo | |
(rdb:1) c | |
[3, 12] in /Users/dev/Dropbox/repos/atlas/test.rb | |
3 'baz' | |
4 end | |
5 end | |
6 | |
7 debugger | |
=> 8 Foo.new.bar | |
/Users/dev/Dropbox/repos/atlas/test.rb:8 | |
Foo.new.bar | |
(rdb:1) break Foo.bar | |
Breakpoint 1 at Foo::bar | |
(rdb:1) c | |
Breakpoint 1 at Foo:bar | |
[-3, 6] in /Users/dev/Dropbox/repos/atlas/test.rb | |
1 class Foo | |
=> 2 def bar | |
3 'baz' | |
4 end | |
5 end | |
6 | |
/Users/dev/Dropbox/repos/atlas/test.rb:2 | |
def bar | |
(rdb:1) c | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment