From 9b514927f58d974e6ef69e84bcafeec6be764831 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Sun, 26 Jan 2014 11:55:02 +0800 Subject: [PATCH] issue #3837:Make `HelloLua` support to debug by the ZeroBrane Studio --- .../project.pbxproj.REMOVED.git-id | 2 +- samples/Lua/HelloLua/Resources/hello.lua | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id index 1448e81537..779b19e39d 100644 --- a/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_samples.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -7a606b7819e4f2a8d7eb689a029974d84d57cf63 \ No newline at end of file +c4a10d83e31c57266fcc9caf7ff46b2bb98706e1 \ No newline at end of file diff --git a/samples/Lua/HelloLua/Resources/hello.lua b/samples/Lua/HelloLua/Resources/hello.lua index 2ca4b8310f..620f28f34c 100644 --- a/samples/Lua/HelloLua/Resources/hello.lua +++ b/samples/Lua/HelloLua/Resources/hello.lua @@ -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))