Skip to content

Latest commit

 

History

History
 
 

README.md

wax Lua debug

you can use Lua debugger tool to debug your lua code

Use steps

  • import wax and mobedebug, like podfile
	pod 'wax', :path=>'../../'
	pod 'mobdebug', :path=>'../../tools/mobdebug'
  • download ZeroBraneStudio
  • run ZeroBraneStudio: double click zbstudio/ZeroBraneStudio or sh zbstudio.sh
  • import lua code: click the 6th buttonSmaller icon, choose your lua code's root directory
  • start debug server: click Project->Start Debugger Server.
  • run this code before you enter debug
    wax_start(nil, nil);//must start before debug
    extern void luaopen_mobdebug_scripts(void* L);
    luaopen_mobdebug_scripts(wax_currentLuaState());
  • addrequire('mobdebug').start('YOUR_MAC_IP_ADDRESS')to your lua code. if you use simulator 'YOUR_MAC_IP_ADDRESS' can be empty
  • launch your app,when require('mobdebug').start() is invoked, ZeroBraneStudio's dock will become active, then you should add breakpoint.

debug functions

step into:Smaller icon
step over:Smaller icon
step out:Smaller icon
run to cursor:Smaller icon
continue:Smaller icon kill app:Smaller icon

remote console:print variable, or call function
watch:watch some variable
stack:show the lua stack

demo overview

overview