Commit ba80c1bdcbe8f023c45ece66adc3dba9cb98c069
- Date: Tue May 13 00:29:19 +0000 2008
- Committer: Tim Harper (timcharper@gmail.com)
- Author: Tim Harper (timcharper@gmail.com)
- Commit SHA1: ba80c1bdcbe8f023c45ece66adc3dba9cb98c069
- Tree SHA1: ec876b1c854983101a23a5f6faa3d5a5aeaeba36
auto-install the debugger extensions, so you can invoke "rdebug -s" and "rdebug -c" outside of the bundle and still use it in textmate
Commit diff
| |   |
| 36 | 36 | # create a file that will set our breakpoint for us |
| 37 | 37 | File.open(RUN_FILE, 'wb') do |f| |
| 38 | 38 | f.puts <<-EOF |
| 39 | | load #{File.join(ENV['TM_BUNDLE_SUPPORT'], '/ext/debugger_extension.rb').inspect} |
| 39 | require #{File.join(ENV['TM_BUNDLE_SUPPORT'], '/ext/debugger_extension.rb').inspect} |
| 40 | 40 | Debugger.start |
| 41 | 41 | Debugger.settings[:autoeval]=1 |
| 42 | 42 | Debugger.settings[:autolist]=1 |
| … | … | |
| 86 | 86 | end |
| 87 | 87 | |
| 88 | 88 | def evaluate(cmd, binding = :current, format = :raw) |
| 89 | command("e require #{File.join(ENV['TM_BUNDLE_SUPPORT'], '/ext/debugger_extension.rb').inspect}") |
| 89 | 90 | o = command("e Debugger.evaluate(#{cmd.inspect}, :#{binding}, :#{format})") |
| 90 | 91 | eval(o) |
| 91 | 92 | rescue Exception |
| toggle raw diff |
--- a/Support/lib/ruby_amp/remote_debugger.rb
+++ b/Support/lib/ruby_amp/remote_debugger.rb
@@ -36,7 +36,7 @@ module RubyAMP
# create a file that will set our breakpoint for us
File.open(RUN_FILE, 'wb') do |f|
f.puts <<-EOF
- load #{File.join(ENV['TM_BUNDLE_SUPPORT'], '/ext/debugger_extension.rb').inspect}
+ require #{File.join(ENV['TM_BUNDLE_SUPPORT'], '/ext/debugger_extension.rb').inspect}
Debugger.start
Debugger.settings[:autoeval]=1
Debugger.settings[:autolist]=1
@@ -86,6 +86,7 @@ module RubyAMP
end
def evaluate(cmd, binding = :current, format = :raw)
+ command("e require #{File.join(ENV['TM_BUNDLE_SUPPORT'], '/ext/debugger_extension.rb').inspect}")
o = command("e Debugger.evaluate(#{cmd.inspect}, :#{binding}, :#{format})")
eval(o)
rescue Exception |