dynamically loading lua code during development

I think reloading lua code at runtime without restarting the app can speed the development process.
What is the suggested way of doing this?

I’ve been working on an IDE (http://studio.zerobrane.com/) that provides an interactive console that allows you to execute any Lua code in your application environment. You can update functions and change variables. I’ve posted several demos on how this and other debugging functions work with Love2d and Moai engines: http://studio.zerobrane.com/tutorials.html. Unfortunately to test this with cocos2d-x require luasocket support and I haven’t figured out yet how to add it.

Paul.

Hi.
i m realy interested in getting zerobrane working with cocos2dx. What exactly is needed to get it working? What exactly means “cocos2dx require luasocket support”?

I’m also very interested in how zerobrane work with cocos2dx.Why it requires luasocket support?

samuele3 hu wrote:

I’m also very interested in how zerobrane work with cocos2dx.Why it requires luasocket support?

luasocket is required because ZeroBrane Studio (and its debugger Mobdebug) use sockets for the interaction between the application being debugged and the IDE.

I posted instructions on how to get the debugging working with luasocket being used as a dynamic library or integrated with cocs2d-x here http://notebook.kulchenko.com/zerobrane/cocos2d-x-simulator-and-on-device-debugging-with-zerobrane-studio ; descriptions for some of the options are based on the feedback provided by others, so I’d appreciate comments on what’s working and what’s not for you.

Hi Paul, i config the environment with this http://notebook.kulchenko.com/zerobrane/cocos2d-x-simulator-and-on-device-debugging-with-zerobrane-studio,
when i run “require(‘mobdebug’).start()” my ios app crash without log. do you know the reason ?

function test( )
— body
local socket = require(“socket”)

for k in pairs(socket) do
print(k)
end

require(‘mobdebug’).start()

print(“Run zerobrane successfully”)
end

test()

Paul K wrote:

samuele3 hu wrote:
> I’m also very interested in how zerobrane work with cocos2dx.Why it requires luasocket support?
>
luasocket is required because ZeroBrane Studio (and its debugger Mobdebug) use sockets for the interaction between the application being debugged and the IDE.
>
I posted instructions on how to get the debugging working with luasocket being used as a dynamic library or integrated with cocs2d-x here http://notebook.kulchenko.com/zerobrane/cocos2d-x-simulator-and-on-device-debugging-with-zerobrane-studio ; descriptions for some of the options are based on the feedback provided by others, so I’d appreciate comments on what’s working and what’s not for you.

Hi Ryan Zheng, I just responded to your question in another thread: http://www.cocos2d-x.org/boards/11/topics/23384?r=32528#message-32528.

Paul.