On Mon, 20 Jul 2009, chris wrote:
Allin Cottrell wrote:
> Now that Chris is back from holiday, I'll mention this: I've
> merged his function debugger code.
>
That's nice! Thank you for the cleanup!
> It would be nice to enable this behaviour within the GUI console
> but that's not trivial. The code in gui2/console.c would have to
> be re-written quite substantially to allow it to work. I've made
> one false start on this myself (since erased from CVS) and I need
> to think about it more carefully before trying again.
>
I think for basic debugging the implementation within gretlcli is
sufficient. The problem with supporting debugging in the gui client is
the callback function to read user commands. I had two ideas about this,
which would put this problem into a wider context:
1. We could add a new function to enable scripts to interact with the
user. A new function, let's say readinput, could read input from the
console. This way the user could alter the execution flow while the
script is running. If we had this facility in place we could use it for
the debugger, too.
2. Perhaps debugging via a console prompt is not sufficient for
gretl_gui users. Perhaps we could open a second instance of the gretl
main window when a function is debugged. Within this window one could
see all series, matrices, etc defined in this function. This way users
would debug function using the same guithey use for normal operations.
These ideas sound good. I now have a basic version of debugging
in the gui console in a semi-usable state; it needs some fixes but
the proof of concept is there. I needed a second debugging
callback function to flush output in the GUI case.
Allin.