|Re: Can LDT debug Lua in a C app? [message #1051928 is a reply to message #1050168]
||Mon, 29 April 2013 11:41
| Simon Bernard
Registered: July 2009
You talk about 'interpreter' and 'Launch script'? Your comment is confusing but I suppose you tried the second solution (so you downloaded the 1.0.0M1 version).|
Did you test the first one ?
If you want to use the second solution, I will try to make it clearer :
When you use a "standard" Lua Interpreter (Lua 5.1, wxLua, LuaJIT ...), you could pass the file you want to be interpreted by the VM.
If I understand in your case, your C application (which will be considered by LDT as an interpreter) can not take a Script file in parameters. So in this case, you must fake the UI and Select any file.
(I agree this is not really userfriendly)
When you registered your interpreter, you need to check/uncheck options in function of your interpreter capabilities. (as explain here)
You say you have no external script, but I suppose your C application load some lua files. Files which are present in your project. Files on which you will set breakpoints. If not, please can you explain me where is your Lua code ?
Now to debug your application, the lua debugger client should be launched. Generally this is done automatically by LDT thx to the -e option but if your application don't support this convention you must launch the debugger on your own.
So choose the lua file which is loading in first and add this line of code at begin : (cal_session]as explain here)
if os.getenv('DEBUG_MODE') then require "debugger"() end[/code]
Do not forget your need luasocket to allow the debugger client to connect to the debugger Server integrated in LDT.
Powered by FUDForum
. Page generated in 0.01402 seconds