why does debugger 'n' seem to run lines TWICE?

S

Sam Roberts

I see this often, but not always, and I don't understand.

Is it that it shows me the line once for the function call (==) and another
time for the conditional?

Here is example:

$ ruby18 -r debug mdns.rb _ftp _http
Debug.rb
Emacs support available.

mdns.rb:3:$: << File.dirname($0)
(rdb:1) b 66
Set breakpoint 1 at mdns.rb:66
(rdb:1) c
Breakpoint 1, toplevel at mdns.rb:66
mdns.rb:66: argv0 = Name.create(n)
(rdb:1) display argv0
1: argv0 =
(rdb:1) n
mdns.rb:68: unless argv0.absolute?
1: argv0 = _ftp
(rdb:1) n
mdns.rb:68: unless argv0.absolute?
1: argv0 = _ftp
(rdb:1)
n
mdns.rb:69: if argv0.to_s[0] == ?_
1: argv0 = _ftp
(rdb:1)
n
mdns.rb:69: if argv0.to_s[0] == ?_
1: argv0 = _ftp
(rdb:1)


$ ruby18 --version
ruby 1.8.2 (2005-01-29) [powerpc-darwin6.8]


Thanks,
Sam
 

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,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top