David
P.S. what about a way to restart the "program under debug", without restarting
the debugger?
DC> P.S. what about a way to restart the "program under debug", without restarting
DC> the debugger?
Sorry, what you mean with this. Do you mean to reload the source files
you that changed since starting the program so that you can have an
"edit and continue" operation in the debugger ?
--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's
Use 'catch off'
> P.S. what about a way to restart the "program under debug", without
restarting
> the debugger?
Do you mean start again from the top? No way that I know of, and
considering the effort it'll take to bring everything to the state it
was before the program started (class definitions, redefinitions,
globals, threads etc) I doubt it's any better than just restarting the
debugger and setting a breakpoint.
BTW, I find unit-tests plus the occasional application of breakpoint
(http://ruby-breakpoint.rubyforge.org, available as a gem) much better
than traditional debugging, both immediately and in the long run.
HTH,
Assaph
I think he means restart the program, as from the beginning without
having to drop out of the debugger. You can do this with a single
buttonpress or mouse click when working with the Microsoft Visual Studio
debugger (thats my guess where the idea comes from).
Its very useful when you realise what you did wrong in the current
debugging session and want to start over again without explicitly
killing the current process and starting a new debugger (the restart
does all those things for you, except the debugger is the same debugger
process with the same breakpoints, watchpoints etc).
Imagine in getting in your car and going for a journey and then pressing
the restart button. You begin again from the parking lot just like you
did 10 minutes ago...
Stephen
--
Stephen Kellett
Object Media Limited
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
SK> Its very useful when you realise what you did wrong in the current
SK> debugging session and want to start over again without explicitly
SK> killing the current process and starting a new debugger (the restart
SK> does all those things for you, except the debugger is the same debugger
SK> process with the same breakpoints, watchpoints etc).
Wow, does "ruby -rdebug" really not offer this feature ?
Thinking about setting breakpoints by typeing filename, linenumber
every time ..... :-(
> I think he means restart the program, as from the beginning without
> having to drop out of the debugger. You can do this with a single
> buttonpress or mouse click when working with the Microsoft Visual Studio
> debugger (thats my guess where the idea comes from).
Eeew. No, the idea came from Perl.
Yes
> No way that I know of, and
> considering the effort it'll take to bring everything to the state it
> was before the program started (class definitions, redefinitions,
> globals, threads etc) I doubt it's any better than just restarting the
> debugger and setting a breakpoint.
Except it's lots of typing for me. Especially if I have a lot of breakpoints.
And I have a hard time leaving the debugger because of the stupid "Really
quit?" (My fingers just have not learned to say Y. I find myself looping
through that 2 or 3 times everytime I want to stop the debugger.
> BTW, I find unit-tests plus the occasional application of breakpoint
> (http://ruby-breakpoint.rubyforge.org, available as a gem) much better
> than traditional debugging, both immediately and in the long run.
I'm a big fan of unit tests, and I continue to strive to write better smaller
ones, but I have yet to reach the 'mythical' point where a debugger is not
helpful. As for breakpoint, maybe I have to adapt, but not being able to
step through code is just not the same.
>
> HTH,
> Assaph