lua-users home
lua-l archive

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


Hi Tom,

> Hi Paul - how do I tell your app to use LuaJIT?  The option does not
> exist in the "Intepreters" list.

I've just added LuaJIT debugging page to the project site:
http://studio.zerobrane.com/doc-luajit-debugging.html (there is also a
page on Lua 5.2 debugging for those interested:
http://studio.zerobrane.com/doc-lua52-debugging.html).

Shortly, it should be as simple as specifying `path.lua =
"/full/path/to/luajit.exe"` in cfg/user.lua. It will use luasocket
bundled with ZBS. If your luajit version is not compatible with
luasocket (for example, you compiled luajit for 64bit, but included
luasocket is 32bit), you will need to compile luasocket yourself and
make the libraries available to your script.

If you are on Window, another option (assuming luajit is compiled for
32bit) is to simply replace bin/lua5.1.dll with lua51.dll from luajit.
This will make ZBS itself to run on LuaJIT as well as all Lua
processes you start from it (in this case path.lua changes are not
needed). In this case both local and remote console will give you
access to LuaJIT interpreter. I haven't tested this extensively, but
it does work for my setup.

Please make sure you use the latest version of LuaJIT as it includes
one post 2.0 fix that is needed for all debugging features to work.
Also note that LuaJIT debugging behavior is slightly different from
Lua 5.1: it may step on the same line several times (which is not a
bug); Lua 5.1 will only step several times if it leaves the line (for
example for a function call), and then returns back to it.

Paul.

On Sat, Feb 16, 2013 at 8:35 AM, Tom Yaxley <tommitytom@gmail.com> wrote:
> Hi Paul - how do I tell your app to use LuaJIT?  The option does not
> exist in the "Intepreters" list.