lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Heinrich Hartmann <heinrich@heinrichhartmann.com> wrote:
> Well, you can inject a debugger into the script itself. For a while I had
> a setup like this:
> 
> When you inject a call to break() into your script the interpreter will
> block and wait for a client to connect with `telnet localhost 1125`. I
> don't have the code at hand to share, but it was not much effort to build.

Very good idea... I hadn't contemplated that idea. I think I was more stuck
on the fact he said the entire engine was crashing outright. Which, to me,
seems to indicate a badly written engine if the scripting language is
capable of outright crashing the game engine. 

Hopefully the game engine itself will allow socket connections. For example,
the Lua engine in World of Warcraft has no facilities for access to things
like the network or arbitrary files. Hopefully if the game engine does give
access to the network via Lua it will easy to tell where the game engine is
crashing from the script, otherwise you may have to step through a lot of
Lua code first.

Still, I am surprised that the game engine itself doesn't have a facility
for debugging Lua scripts, given it has an embedded Lua runtime! I would
still check with the vendors to see if they have some sort of debugging
environment available for their game engine... it seems odd they wouldn't!

~Paige