[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby Debugger. Remove catchpoint?

David Corbin

5/22/2005 1:01:00 AM

Is there someway to remove a catchpoint while in the debugger? Better yet, is
there a way to fix it so it doesn't default to catching StandardError?

David

P.S. what about a way to restart the "program under debug", without restarting
the debugger?


6 Answers

Lothar Scholz

5/23/2005 3:54:00 AM

0

Hello David,

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.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




Assaph Mehr

5/23/2005 4:40:00 AM

0


David Corbin wrote:
> Is there someway to remove a catchpoint while in the debugger?
Better yet, is
> there a way to fix it so it doesn't default to catching
StandardError?

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.rub..., available as a gem) much better
than traditional debugging, both immediately and in the long run.

HTH,
Assaph

Stephen Kellett

5/23/2005 8:29:00 AM

0

In message <612777546.20050523055333@scriptolutions.com>, Lothar Scholz
<mailinglists@scriptolutions.com> writes
>Hello David,
>
>DC> P.S. what about a way to restart the "program under debug", without
>DC>restarting
>DC> the debugger?
>
>Sorry, what you mean with this.

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

Lothar Scholz

5/23/2005 9:06:00 AM

0

Hello Stephen,


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 ..... :-(



--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




David Corbin

5/24/2005 10:34:00 AM

0

On Monday 23 May 2005 04:35 am, Stephen Kellett wrote:

> 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.



David Corbin

5/24/2005 10:40:00 AM

0

On Monday 23 May 2005 12:40 am, Assaph Mehr wrote:
> Do you mean start again from the top?

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.rub..., 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