Reputation: 31
I am new to Lua. I have an ARM Cortex based product with an OS providing TCP stack, SD card for file storage, and lots of custom hardware. I have embedded Lua (from the standard source distribution) into the product and added an API to give Lua access to my hardware. Also have Telnet and FTP services running. Works great.
Now I would like to add the ability to debug scripts with ZeroBrane. Looks like I need to add MobDebug, and connect it to my OS thru LuaSockets. Assuming this is a valid approach, can anybody point to a tutorial or documentation that would help?
Thanks
Upvotes: 2
Views: 413
Reputation: 26754
Assuming you have access to luasocket on that platform, you can follow the instructions on remote debugging with MobDebug and ZeroBrane Studio. It should be a matter of adding require('mobdebug').start('IP-of-computer-running-ZeroBraneStudio')
and making project files available in ZeroBrane Studio.
ZeroBrane Studio also does mapping between different file systems to allow debugging of scripts running on one platform from the IDE running on a (possibly) different platform. You only need to make sure you have the same project structure. For example, you may have /usr/me/myprojects/projectA/fileB.lua
and start debugging of projectA/fileB.lua
in /usr/me/myprojects/
; then on the IDE side you may have D:\Users\Me\myprojects\projectA\fileB.lua
opened in the IDE and it will attempt to map /usr/me/myprojects/
to D:\Users\Me\myprojects\
. If you run into issues, you can use IRC or the maillist to get further help.
Upvotes: 1