From 740d17002e9b93d1a8117237f4bd4df8abcbbe64 Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Fri, 26 Apr 2013 17:14:02 +0200 Subject: [PATCH] add debug mode --- lib/motion/project/template/osx.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/motion/project/template/osx.rb b/lib/motion/project/template/osx.rb index 2f93c25f..f91a4230 100644 --- a/lib/motion/project/template/osx.rb +++ b/lib/motion/project/template/osx.rb @@ -40,6 +40,11 @@ end desc "Run the project" task :run => 'build' do exec = App.config.app_bundle_executable('MacOSX') - App.info 'Run', exec - sh exec + if ENV['debug'] + App.info 'Debug', exec + sh "/usr/bin/gdb --args \"#{exec}\"" + else + App.info 'Run', exec + sh exec + end end