|
Post by billw on Jan 25, 2008 14:45:27 GMT -5
Okay, so Run BASIC doesn't have a debugger, but I still think we can at least have some a way to view variables. Here's how it might work: A user module, #modDebug, is run from the program being debugged. The main program calls an initialization method with a reference to itself *, and renders the module. run "modDebug", #modDebug #modDebug init(#me) render #modDebug #modDebug's init() method does something very cool: it parses the main module's source code * to make a list of all variables used in the program. It then opens up a window containing a table of all variables and their values. A timer is used to continuously update the display. Another thing that could be added is the ability to log messages to the debug window. I'm sure there's more that could be done. The catch: Two, features need to be added for this to work. The most important are a #me or #self implicit object, that returns a reference to the current module. Also needed is eval() and friends, to be able to dynamically get the value of variables from the main module. Perhaps it would best be implemented as a method of the program object, for more flexibility and clarity. Any thoughts on this, guys?
|
|
|
Post by carlgundel on Jan 25, 2008 17:40:40 GMT -5
Bill,
Thanks for the ideas. Run BASIC will have a #self variable, and in fact I've been kicking myself for not putting it into v1.0.
As for a debugger, we will add some debugging capabilities. A logging feature is a strong contender, and some sort of inspection panel option. Eventually we may even manage a stepping source debugger.
As for EVAL(), I want to add that too. I don't have a timetable for it.
-Carl
|
|