Debug though co-routines [message #1387613] |
Wed, 25 June 2014 06:28  |
Eclipse User |
|
|
|
Hello,
I'm trying to debug with koneki the code of one of the examples of Orbit MVC Framework in order to understand how to debug my web application.
github.com/keplerproject/orbit/tree/master/samples
I'm using Xavante web server which uses WSAPI to launch the "Blog" sample.
My problem is that I only can debug the xavante launcher; when WSAPI creates a co-routine I'm not able to break into the blog application.
I think the problem is due to the cration of a new LUA state, dedicated to the "blog" wb app, when the co-routine is created.
Both the solutions of local and attached debug don't work. In case of local debug my application seems to break on the first breakpoint, but I don't see it (only using print in the code) and I can't control the debug session.
I also tried with AKdebugger, but the behavior is very similar...
This is my "start.lua" code, the Xavante launcher:
require "xavante"
require "xavante.filehandler"
require "xavante.redirecthandler"
require "wsapi.xavante"
-- Define here where Xavante HTTP documents scripts are located
local webDir = "."
local simplerules = {
{ -- URI remapping example
match = "^[^%./]*/$",
with = xavante.redirecthandler,
params = {"blog.ws"}
},
{
match = {"%.ws$", "%.ws/.*$" },
with = wsapi.xavante.makeGenericHandler (webDir)
},
{ -- filehandler example
match = ".",
with = xavante.filehandler,
params = {baseDir = webDir}
},
}
xavante.HTTP{
server = {host = "*", port = 8080},
defaultHost = {
rules = simplerules
},
}
xavante.start()
I'm wrong in something? I'm a newbie in LUA...
Can anyone help me?
Thank you very much.
Luca
|
|
|
|
|
Re: Debug though co-routines [message #1389315 is a reply to message #1388328] |
Fri, 27 June 2014 12:27  |
Eclipse User |
|
|
|
Are you sure you have copied the whole log ? because after the line :
<response transaction_id="20" status="break" ...
You should have the following command, that give to eclipse the information of where the break is.
>> breakpoint_get -d 0 -i 73
<< <?xml version="1.0" encoding="UTF-8" ?>
<response transaction_id="73" command="breakpoint_get" xmlns="urn:debugger_protocol_v1"><breakpoint id="0" hit_count="1" state="enabled" filename="file:///home/maubry/LDT/standalone1.2.0.RC2/workspace/mldks/src/main.lua" hit_value="0" type="line" lineno="2" hit_condition=">="/></response>
And also you should have more commands to retrieve the context.
Before going deeper, can you just ensure you used the right debugger.lua module version ? You can find the debugger compatible with your LDT version by clicking on the link "Lua Debugger Client" in any Lua Attach Debug Configuration page.
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.06523 seconds