lua-users home
lua-l archive

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


On Thu, Feb 1, 2018 at 10:16 AM, Paige DePol <lual@serfnet.org> wrote:
> 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.

Not ARBITRARY files, but WoW scripts can access certain permitted
files. I've seen scripts do I/O against a file that's managed by an
external daemon process to provide broader functionality.

In a pinch, you could use something like this.

/s/ Adam