[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: newbie: how to modify lua code while the program is running like visual basic
- From: Philippe Lhoste <PhiLho@...>
- Date: Fri, 22 Jun 2012 14:44:44 +0200
On 21/06/2012 21:41, yoyomeltz yoyomeltz wrote:
kevin, thanks you much. it does seem to offer what i wanted but the problem is i would be
locked into an ide that does not seem to offer much else.
there has to be a simple way to dynamically reload code as needed via a
console/command.line or other simple solution.
if visual basic from microsoft can do it and python can do it, then why should i be an
issue for Lua.
even visual basic 6.0 from 10 years ago can do that.
it seems to me this such a feature is a pre-requisite for learning any language, espcially
a lightweight scripting language.
so does anybody have any other suggestions?
Well, if I am not mistaken, VB is "locked into an IDE"...
I don't know for Python.
Debugging is often tied to an IDE anyway, unless you are using some command line debug
tool (but that's still a tool, often separate of the compiler / interpreter, no?).
Eclipse (and probably other Java IDEs as well) allows such hot fix, changing code while
running and the program continue to run with this change.
Now, it has some limitations: if you change a method while debugging in it, Eclipse puts
the current program line pointer to the start of the method.
If you change deeply a class, eg. the visibility of a method, or a new method, it tells
you it can't do the hot fix and shows markers in the debug stack trace to show the code is
no longer synchronized.
So it isn't a perfect feature for every language / IDE. Just a very convenient feature!
Note: don't under-evaluate the power of print() in tracing / debugging Lua! :-)
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --