diff options
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/kernel/debugger.rb | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/kernel.rb b/activesupport/lib/active_support/core_ext/kernel.rb index 1aa4f72b45..6475be7efa 100644 --- a/activesupport/lib/active_support/core_ext/kernel.rb +++ b/activesupport/lib/active_support/core_ext/kernel.rb @@ -2,3 +2,4 @@ require File.dirname(__FILE__) + '/kernel/daemonizing' require File.dirname(__FILE__) + '/kernel/reporting' require File.dirname(__FILE__) + '/kernel/agnostics' require File.dirname(__FILE__) + '/kernel/requires' +require File.dirname(__FILE__) + '/kernel/debugger' diff --git a/activesupport/lib/active_support/core_ext/kernel/debugger.rb b/activesupport/lib/active_support/core_ext/kernel/debugger.rb new file mode 100644 index 0000000000..c74d6cf884 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/kernel/debugger.rb @@ -0,0 +1,13 @@ +module Kernel + unless respond_to?(:debugger) + # Starts a debugging session if ruby-debug has been loaded (call script/server --debugger to do load it). + def debugger + RAILS_DEFAULT_LOGGER.info "\n***** Debugger requested, but was not available: Start server with --debugger to enable *****\n" + end + end + + def breakpoint + RAILS_DEFAULT_LOGGER.info "\n***** The 'breakpoint' command has been renamed 'debugger' -- please change *****\n" + debugger + end +end
\ No newline at end of file |