debug mode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

debug mode

Jim Van Zandt

Is there any prospect for a debug mode in Octave?  I'd like something
that would let me single step through a script, with an indication of
where I am in the source code.  An emacs debug mode would be great.
(I believe Octave would have to support single-stepping before an
emacs debug mode could be written.)

                            - Jim Van Zandt

Reply | Threaded
Open this post in threaded view
|

Re: debug mode

Kurt Hornik-3
>>>>> Jim Van Zandt writes:

> Is there any prospect for a debug mode in Octave?  I'd like something
> that would let me single step through a script, with an indication of
> where I am in the source code.  An emacs debug mode would be great.
> (I believe Octave would have to support single-stepping before an
> emacs debug mode could be written.)

Jim:

I don't know about JWE's plans for adding a debug/undebug/traceback etc
mechanism.

Meanwhile, you could use my Emacs octave-mode's functionality for that.
If you visit a file containing code in Octave mode, you can send pieces
of code to an inferior Octave process by using the functions

        octave-send-line (current line) C-c i l
        octave-send-block (current block) C-c i b
        octave-send-defun (current function) C-c i f
        octave-send-region (current region) C-c i r

-k

Reply | Threaded
Open this post in threaded view
|

debug mode

John W. Eaton-6
In reply to this post by Jim Van Zandt
On 28-Feb-1997, Jim Van Zandt <[hidden email]> wrote:

| Is there any prospect for a debug mode in Octave?  I'd like something
| that would let me single step through a script, with an indication of
| where I am in the source code.  An emacs debug mode would be great.

Given Octave's current parse tree based interpreter, it might be a
little bit tricky.  I have some ideas about converting the parse tree
to a byte-code stack for improving performance, and I think that would
also make debugging a bit easier.  But again, it takes considerably
longer to implement these ideas than it does to come up with them, so
I don't have any idea when (or if) I will get a chance to actually
work on this project.

| (I believe Octave would have to support single-stepping before an
| emacs debug mode could be written.)

It would probably make things a bit easier.  :-)

jwe