debugger restart

Discussion in 'Ruby' started by R. Mark Volkmann, May 23, 2005.

  1. In looking through the debugger commands for "ruby -r debug {name}.rb", I don't
    see a way to restart execution. It seems that you have to quit the debugger
    and restart it. Is that correct?

    --
    R. Mark Volkmann
    Partner, Object Computing, Inc.
    R. Mark Volkmann, May 23, 2005
    #1
    1. Advertising

  2. R. Mark Volkmann

    Sam Roberts Guest

    Quoting , on Mon, May 23, 2005 at 10:53:50AM +0900:
    > In looking through the debugger commands for "ruby -r debug {name}.rb", I don't
    > see a way to restart execution. It seems that you have to quit the debugger
    > and restart it. Is that correct?


    As far as I have been able to tell. Its a huge PITA, isn't it? You get
    all your breakpoints and everything set up, then skip past your bug, and
    have to do it all over again.

    Writing the debugger in ruby is cool, but appears to have some
    downsides.

    Sam
    Sam Roberts, May 24, 2005
    #2
    1. Advertising

  3. Hi,

    In message "Re: debugger restart"
    on Tue, 24 May 2005 08:48:36 +0900, Sam Roberts <> writes:

    |As far as I have been able to tell. Its a huge PITA, isn't it? You get
    |all your breakpoints and everything set up, then skip past your bug, and
    |have to do it all over again.
    |
    |Writing the debugger in ruby is cool, but appears to have some
    |downsides.

    Does this small patch helps you?

    The r (restart) command moves you back to the beginning. And at the
    script termination, it goes back to the start as well, unless you
    specify q (quit) command.

    --- lib/debug.rb 6 Dec 2004 15:31:25 -0000 1.54
    +++ lib/debug.rb 24 May 2005 08:18:39 -0000
    @@ -257,2 +257,8 @@ class Context
    MUTEX.lock
    + unless $debugger_restart
    + callcc{|c| $debugger_restart = c}
    + at_exit {
    + $debugger_restart.call
    + }
    + end
    set_last_thread(Thread.current)
    @@ -525,2 +531,5 @@ class Context
    stdout.printf "%s\n", debug_eval($', binding).inspect
    +
    + when /^\s*r(?:estart)?$/
    + $debugger_restart.call
    Yukihiro Matsumoto, May 24, 2005
    #3
    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. python
    Replies:
    13
    Views:
    584
    Mike Meyer
    Nov 10, 2005
  2. David Corbin

    Restart Debugger

    David Corbin, Oct 18, 2003, in forum: Ruby
    Replies:
    0
    Views:
    102
    David Corbin
    Oct 18, 2003
  3. Barge Bill
    Replies:
    2
    Views:
    150
    Barge Bill
    Oct 31, 2005
  4. Robert Oschler
    Replies:
    1
    Views:
    222
    Mcginkel
    Sep 5, 2005
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    280
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page