From 472cd8a6fd32ecc005f7bf58a1b6dcd8b21c04ab Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Sat, 15 Sep 2012 16:58:01 +0200 Subject: [PATCH] start debugger if any value is passed to 'debug' --- lib/motion/project.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/motion/project.rb b/lib/motion/project.rb index 323e7991..9c7c8e1e 100644 --- a/lib/motion/project.rb +++ b/lib/motion/project.rb @@ -95,8 +95,7 @@ task :simulator => ['build:simulator'] do env = xcode.match(/^\/Applications/) ? "DYLD_FRAMEWORK_PATH=\"#{xcode}/../Frameworks\":\"#{xcode}/../OtherFrameworks\"" : '' env << ' NO_FOREGROUND_SIM=1' if App.config.spec_mode sim = File.join(App.config.bindir, 'sim') - debug = (ENV['debug'] || (App.config.spec_mode ? '0' : '2')).to_i - debug = 2 if debug < 0 or debug > 2 + debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2')) App.info 'Simulate', app at_exit { system("stty echo") } # Just in case the simulator launcher crashes and leaves the terminal without echo. sh "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\""