octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can no longer dbcont after error


From: LachlanA
Subject: Re: Can no longer dbcont after error
Date: Sun, 6 Dec 2015 02:06:23 -0800 (PST)

Thanks for the reply, John.

On reflection, I agree that there is no natural statement to continue from. 
However, the behaviour I want can be achieved with a try/catch block and the
"dbstop if caught error" feature provided by
[https://savannah.gnu.org/patch/index.php?8784].

This patch supports all of Matlab's dbstop options except for stopping in
anonymous functions, and "dbstop if naninf".  It will be great to have
conditional breakpoints, if the patch gets applied.  Could someone please
give me some feedback on the patch?

There are three additional extensions I have been considering.
1. Allowing conditional breakpoints to refer to an expression in the calling
function's stack frame.  This could have a syntax like "dbstop in <function>
at <line> if ../(iter == 47)".
2. Allowing "dbstop once ...".  That would make it easy to have a
single-click "run until this line" in the GUI (barring exceptions etc.) 
That is different from "dbstep <n>", because that relies on knowing how many
iterations occur, or which branch of an if is taken.
3. Allowing "dbstop if <condition>", which would check <condition> after
every statement.  That would be very slow, but allow easy answering of the
question "where on earth did that value get set", which I often ask myself. 
I'd love to be able to say "dbstop in <function> if <condition>" to limit it
to only checking within that function, but that syntax is already used for
conditionally stopping at the first line of the function.  One option would
be to replace "if" by "when".

Anyway, that is getting a long way from the subject line of this thread...

Cheers,
Lachlan



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Can-no-longer-dbcont-after-error-tp4673748p4673854.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]