[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keyboard() 'exit' function broken
From: |
Rik |
Subject: |
Re: keyboard() 'exit' function broken |
Date: |
Fri, 29 May 2009 22:08:25 -0700 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090318) |
John W. Eaton wrote:
> On 29-May-2009, Rik wrote:
>
> | The keyboard function for debugging stops normal execution and drops the
> | user back to the Octave prompt where they can inspect variables, perform
> | calculations to verify intermediate results, etc. To resume execution
> | the user types 'exit' or 'quit'.
> |
> | Unfortunately in the latest tip typing 'exit' doesn't resume execution
> | but drops the user completely out of Octave and back to the shell.
> |
> | Demonstration code:
> |
> | function myfunc
> | set_a_variable_for_inspection = 1;
> | keyboard;
> | end
> |
> | Then type 'myfunc' at the prompt which will stop at line 3 and present
> | the 'debug>' prompt. Typing 'exit' will drop the user to the shell.
>
> To continue from the debug or keyboard prompt, type dbcont. If the
> documentation says otherwise, it should be fixed. FWIW, I think that
> this is also the way Matlab works.
>
The current documentation is very explicit about using 'quit' or 'exit'
so it should be changed. Matlab documentation states that 'return'
should be used
(http://www.mathworks.com/access/helpdesk/help/techdoc/ref/keyboard.html).
I just verified that either 'return' or 'dbcont' will work. Which
direction do we want to promote in the documentation? 'return' or 'dbcont'?
--Rik