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

Discussion in 'Ruby' started by Sam Roberts, Jan 31, 2005.

  1. Sam Roberts

    Sam Roberts Guest

    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
     
    Sam Roberts, Jan 31, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tfs
    Replies:
    1
    Views:
    373
    Ken Cox [Microsoft MVP]
    Jun 28, 2004
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,124
    Smokey Grindel
    Dec 2, 2006
  3. Replies:
    1
    Views:
    405
  4. Jim Mitchell
    Replies:
    1
    Views:
    265
    Jim Mitchell
    Aug 16, 2003
  5. Peter J. Holzer

    How does the perl debugger find the source lines

    Peter J. Holzer, Dec 26, 2013, in forum: Perl Misc
    Replies:
    4
    Views:
    131
    Rainer Weikusat
    Dec 30, 2013
Loading...

Share This Page