lua-users home
lua-l archive

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


----- Original Message -----
From: Paul K
Date: 9/3/2012 7:47 PM
ZeroBrane Studio is a lightweight Lua IDE with code completion, syntax
highlighting, live coding, remote debugger, code analyzer, and
hypertext/markdown formatting support for integrating learning
materials (examples and demos provided).
Is there an example of hooking up the remote debugger into your own application?

I currently use the Tilde Lua debugger, but I am interested in a multi-platform solution (Windows and OS X). Hooking Tilde into my application is a matter of doing the following:

    #include "tilde/LuaHostWindows.h"

    tilde::LuaHostWindows* host = new tilde::LuaHostWindows();
    host->RegisterState("State", globalL);
host->WaitForDebuggerConnection(); // Optional... call host->Poll() if you want to accept a connection at any time.

Tilde uses a .vcproj file to describe a project folder hierarchy. That project folder hierarchy is used directly by the remote debugger to resolve the location of the file. For instance, if the file on disk is c:\folderA\folderB\frontend.lua (obviously dependent on the host file system), the .vcproj may describe the folder hierarchy as UI/FrontEnd/frontend.lua. The application sends across the string "ui/frontend/frontend.lua", and Tilde uses that to resolve the file to c:\folderA\folderB\frontend.lua.

Tilde only supports debugging one master Lua state and all of its associated coroutines. Does ZeroBrane Studio support debugging more than one master Lua state?

Thanks!

Josh