06-10-2015, 09:59 PM
As for debugging, are you using any IDE? I'm personally using ZeroBrane Studio and I have to say it is a lifesaver. Not only is it a nice Lua editor, we also managed to put together a really nice MCServer integration, so you can get code completion with real MCServer API and most importantly you get a Lua debugger, capable of breakpoints, watches, locals etc. while your plugin is running in the server. There's an article on how to set it up: http://apidocs.cuberite.org/SettingUpZeroBrane.html
Of course it has some shortcomings, it does have a few bugs, I've seen a few crashes, but overall it's the best Lua IDE I've worked with so far.
As for the workflow, I edit my plugin in ZBS, then start the server from there, which automatically attaches the debugger. When I find a problem, I just edit the plugin's source in the IDE and then use the server's console to execute the "reloadplugins" command - this reloads the new version of the plugin and everything keeps on going.
Of course it has some shortcomings, it does have a few bugs, I've seen a few crashes, but overall it's the best Lua IDE I've worked with so far.
As for the workflow, I edit my plugin in ZBS, then start the server from there, which automatically attaches the debugger. When I find a problem, I just edit the plugin's source in the IDE and then use the server's console to execute the "reloadplugins" command - this reloads the new version of the plugin and everything keeps on going.