issue #3837:Make `HelloLua` support to debug by the ZeroBrane Studio

This commit is contained in:
samuele3hu 2014-01-26 11:55:02 +08:00
parent e6b1df3388
commit 9b514927f5
2 changed files with 8 additions and 1 deletions

View File

@ -1 +1 @@
7a606b7819e4f2a8d7eb689a029974d84d57cf63
c4a10d83e31c57266fcc9caf7ff46b2bb98706e1

View File

@ -17,6 +17,13 @@ local function main()
collectgarbage("setpause", 100)
collectgarbage("setstepmul", 5000)
--support debug
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) or
(cc.PLATFORM_OS_ANDROID == targetPlatform) or (cc.PLATFORM_OS_WINDOWS == targetPlatform) or
(cc.PLATFORM_OS_MAC == targetPlatform) then
require('mobdebug').start()
end
require "hello2"
cclog("result is " .. myadd(1, 1))