Debug though co-routines [message #1417150] |
Wed, 25 June 2014 15:09 |
Luca Ghezzi Messages: 4 Registered: June 2014 |
Junior Member |
|
|
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... :d
Can anyone help me?
Thank you very much.
Luca
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04151 seconds