ruby-debug-ide 0.4.17.beta6 → 0.4.17.beta8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/rdebug-ide +8 -0
 - data/lib/ruby-debug-ide.rb +16 -2
 - data/lib/ruby-debug/event_processor.rb +1 -0
 - data/lib/ruby-debug/version.rb +2 -2
 - data/lib/ruby-debug/xml_printer.rb +4 -14
 - metadata +30 -57
 
    
        data/bin/rdebug-ide
    CHANGED
    
    | 
         @@ -1,4 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            #!/usr/bin/env ruby
         
     | 
| 
      
 2 
     | 
    
         
            +
            # start by patching require, so command-line debug won't get in the way
         
     | 
| 
      
 3 
     | 
    
         
            +
            ::Kernel.module_eval do
         
     | 
| 
      
 4 
     | 
    
         
            +
              alias ide_debug_original_require require
         
     | 
| 
      
 5 
     | 
    
         
            +
              def self.require(file)
         
     | 
| 
      
 6 
     | 
    
         
            +
                ide_debug_original_require(file) if file !~ /ruby-debug(.rb)?$/
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
              private :require
         
     | 
| 
      
 9 
     | 
    
         
            +
            end
         
     | 
| 
       2 
10 
     | 
    
         | 
| 
       3 
11 
     | 
    
         
             
            require 'rubygems'
         
     | 
| 
       4 
12 
     | 
    
         
             
            require 'optparse'
         
     | 
    
        data/lib/ruby-debug-ide.rb
    CHANGED
    
    | 
         @@ -26,7 +26,21 @@ module Debugger 
     | 
|
| 
       26 
26 
     | 
    
         
             
                    $stderr.flush
         
     | 
| 
       27 
27 
     | 
    
         
             
                  end
         
     | 
| 
       28 
28 
     | 
    
         
             
                end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
      
 29 
     | 
    
         
            +
                
         
     | 
| 
      
 30 
     | 
    
         
            +
                def cleanup_backtrace(backtrace)
         
     | 
| 
      
 31 
     | 
    
         
            +
                   cleared = []
         
     | 
| 
      
 32 
     | 
    
         
            +
                   return cleared unless backtrace
         
     | 
| 
      
 33 
     | 
    
         
            +
                   backtrace.each do |line|
         
     | 
| 
      
 34 
     | 
    
         
            +
                     if line.index(File.expand_path(File.dirname(__FILE__) + "/..")) == 0
         
     | 
| 
      
 35 
     | 
    
         
            +
                       next
         
     | 
| 
      
 36 
     | 
    
         
            +
                     end
         
     | 
| 
      
 37 
     | 
    
         
            +
                     if line.index("-e:1") == 0
         
     | 
| 
      
 38 
     | 
    
         
            +
                       break
         
     | 
| 
      
 39 
     | 
    
         
            +
                     end
         
     | 
| 
      
 40 
     | 
    
         
            +
                     cleared << line
         
     | 
| 
      
 41 
     | 
    
         
            +
                   end
         
     | 
| 
      
 42 
     | 
    
         
            +
                   cleared
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
       30 
44 
     | 
    
         
             
              end
         
     | 
| 
       31 
45 
     | 
    
         | 
| 
       32 
46 
     | 
    
         
             
              class Context
         
     | 
| 
         @@ -112,8 +126,8 @@ module Debugger 
     | 
|
| 
       112 
126 
     | 
    
         
             
                  abs_prog_script = File.expand_path(Debugger::PROG_SCRIPT)
         
     | 
| 
       113 
127 
     | 
    
         
             
                  bt = debug_load(abs_prog_script, options.stop, options.load_mode)
         
     | 
| 
       114 
128 
     | 
    
         
             
                  if bt && !bt.is_a?(SystemExit)
         
     | 
| 
       115 
     | 
    
         
            -
                    $stderr.print bt.backtrace.map{|l| "\t#{l}"}.join("\n"), "\n"
         
     | 
| 
       116 
129 
     | 
    
         
             
                    $stderr.print "Uncaught exception: #{bt}\n"
         
     | 
| 
      
 130 
     | 
    
         
            +
                    $stderr.print Debugger.cleanup_backtrace(bt.backtrace).map{|l| "\t#{l}"}.join("\n"), "\n"
         
     | 
| 
       117 
131 
     | 
    
         
             
                  end
         
     | 
| 
       118 
132 
     | 
    
         
             
                end
         
     | 
| 
       119 
133 
     | 
    
         | 
| 
         @@ -59,6 +59,7 @@ end 
     | 
|
| 
       59 
59 
     | 
    
         
             
                   @printer.print_debug("Stopping Thread %s", context.thread.to_s)
         
     | 
| 
       60 
60 
     | 
    
         
             
                   @printer.print_debug("Threads equal: %s", Thread.current == context.thread)
         
     | 
| 
       61 
61 
     | 
    
         
             
                   IdeCommandProcessor.new(@interface).process_commands
         
     | 
| 
      
 62 
     | 
    
         
            +
                   InspectCommand.clear_references
         
     | 
| 
       62 
63 
     | 
    
         
             
                   @printer.print_debug("Resumed Thread %s", context.thread.to_s)
         
     | 
| 
       63 
64 
     | 
    
         
             
                   @line = nil
         
     | 
| 
       64 
65 
     | 
    
         
             
                   @file = nil
         
     | 
    
        data/lib/ruby-debug/version.rb
    CHANGED
    
    | 
         @@ -1,3 +1,3 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            module Debugger
         
     | 
| 
       2 
     | 
    
         
            -
              IDE_VERSION='0.4.17. 
     | 
| 
      
 1 
     | 
    
         
            +
            module Debugger
         
     | 
| 
      
 2 
     | 
    
         
            +
              IDE_VERSION='0.4.17.beta8'
         
     | 
| 
       3 
3 
     | 
    
         
             
            end
         
     | 
| 
         @@ -11,25 +11,13 @@ module Debugger 
     | 
|
| 
       11 
11 
     | 
    
         
             
                  def initialize(exception)
         
     | 
| 
       12 
12 
     | 
    
         
             
                    @exception = exception
         
     | 
| 
       13 
13 
     | 
    
         
             
                    @message = exception.message
         
     | 
| 
       14 
     | 
    
         
            -
                    @backtrace = cleanup_backtrace(exception.backtrace)
         
     | 
| 
      
 14 
     | 
    
         
            +
                    @backtrace = Debugger.cleanup_backtrace(exception.backtrace)
         
     | 
| 
       15 
15 
     | 
    
         
             
                  end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                  private 
         
     | 
| 
       18 
18 
     | 
    
         
             
                  def method_missing(called, *args, &block) 
         
     | 
| 
       19 
19 
     | 
    
         
             
                    @exception.__send__(called, *args, &block) 
         
     | 
| 
       20 
20 
     | 
    
         
             
                  end
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
                  def cleanup_backtrace(backtrace)
         
     | 
| 
       23 
     | 
    
         
            -
                    cleared = []
         
     | 
| 
       24 
     | 
    
         
            -
                    return cleared unless backtrace
         
     | 
| 
       25 
     | 
    
         
            -
                    backtrace.each do |line|
         
     | 
| 
       26 
     | 
    
         
            -
                      if line.index(File.expand_path(File.dirname(__FILE__))) == 0
         
     | 
| 
       27 
     | 
    
         
            -
                        break
         
     | 
| 
       28 
     | 
    
         
            -
                      end
         
     | 
| 
       29 
     | 
    
         
            -
                      cleared << line
         
     | 
| 
       30 
     | 
    
         
            -
                    end
         
     | 
| 
       31 
     | 
    
         
            -
                    cleared
         
     | 
| 
       32 
     | 
    
         
            -
                  end
         
     | 
| 
       33 
21 
     | 
    
         
             
                end
         
     | 
| 
       34 
22 
     | 
    
         | 
| 
       35 
23 
     | 
    
         
             
                def self.protect(mname)
         
     | 
| 
         @@ -272,7 +260,9 @@ module Debugger 
     | 
|
| 
       272 
260 
     | 
    
         | 
| 
       273 
261 
     | 
    
         
             
                def print_exception(exception, binding)
         
     | 
| 
       274 
262 
     | 
    
         
             
                  print_variables(%w(error), 'exception') do |var|
         
     | 
| 
       275 
     | 
    
         
            -
                    ExceptionProxy.new(exception)
         
     | 
| 
      
 263 
     | 
    
         
            +
                    proxy = ExceptionProxy.new(exception)
         
     | 
| 
      
 264 
     | 
    
         
            +
                    InspectCommand.reference_result(proxy)
         
     | 
| 
      
 265 
     | 
    
         
            +
                    proxy
         
     | 
| 
       276 
266 
     | 
    
         
             
                  end
         
     | 
| 
       277 
267 
     | 
    
         
             
                rescue
         
     | 
| 
       278 
268 
     | 
    
         
             
                  print "<processingException type=\"%s\" message=\"%s\"/>", 
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,51 +1,38 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ruby-debug-ide
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.17.beta8
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 7
         
     | 
| 
       6 
     | 
    
         
            -
              segments: 
         
     | 
| 
       7 
     | 
    
         
            -
              - 0
         
     | 
| 
       8 
     | 
    
         
            -
              - 4
         
     | 
| 
       9 
     | 
    
         
            -
              - 17
         
     | 
| 
       10 
     | 
    
         
            -
              - beta
         
     | 
| 
       11 
     | 
    
         
            -
              - 6
         
     | 
| 
       12 
     | 
    
         
            -
              version: 0.4.17.beta6
         
     | 
| 
       13 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       14 
     | 
    
         
            -
            authors: 
     | 
| 
      
 7 
     | 
    
         
            +
            authors:
         
     | 
| 
       15 
8 
     | 
    
         
             
            - Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team
         
     | 
| 
       16 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       17 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       18 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2011-08-15 00:00:00.000000000Z
         
     | 
| 
      
 13 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 14 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 15 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: &70349904728880 !ruby/object:Gem::Requirement
         
     | 
| 
       24 
17 
     | 
    
         
             
                none: false
         
     | 
| 
       25 
     | 
    
         
            -
                requirements: 
     | 
| 
       26 
     | 
    
         
            -
                - -  
     | 
| 
       27 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       28 
     | 
    
         
            -
                    hash: 61
         
     | 
| 
       29 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       30 
     | 
    
         
            -
                    - 0
         
     | 
| 
       31 
     | 
    
         
            -
                    - 8
         
     | 
| 
       32 
     | 
    
         
            -
                    - 1
         
     | 
| 
      
 18 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 19 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 20 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
21 
     | 
    
         
             
                    version: 0.8.1
         
     | 
| 
       34 
     | 
    
         
            -
              name: rake
         
     | 
| 
       35 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       36 
     | 
    
         
            -
              version_requirements: *id001
         
     | 
| 
       37 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
               
     | 
| 
      
 23 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *70349904728880
         
     | 
| 
      
 25 
     | 
    
         
            +
            description: ! 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
         
     | 
| 
      
 26 
     | 
    
         
            +
              and RubyMine.
         
     | 
| 
       40 
27 
     | 
    
         | 
| 
      
 28 
     | 
    
         
            +
            '
         
     | 
| 
       41 
29 
     | 
    
         
             
            email: rubymine-feedback@jetbrains.com
         
     | 
| 
       42 
     | 
    
         
            -
            executables: 
     | 
| 
      
 30 
     | 
    
         
            +
            executables:
         
     | 
| 
       43 
31 
     | 
    
         
             
            - rdebug-ide
         
     | 
| 
       44 
     | 
    
         
            -
            extensions: 
     | 
| 
      
 32 
     | 
    
         
            +
            extensions:
         
     | 
| 
       45 
33 
     | 
    
         
             
            - ext/mkrf_conf.rb
         
     | 
| 
       46 
34 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
            files: 
         
     | 
| 
      
 35 
     | 
    
         
            +
            files:
         
     | 
| 
       49 
36 
     | 
    
         
             
            - CHANGES
         
     | 
| 
       50 
37 
     | 
    
         
             
            - ChangeLog
         
     | 
| 
       51 
38 
     | 
    
         
             
            - ChangeLog.archive
         
     | 
| 
         @@ -79,40 +66,26 @@ files: 
     | 
|
| 
       79 
66 
     | 
    
         
             
            - lib/ruby-debug-ide.rb
         
     | 
| 
       80 
67 
     | 
    
         
             
            homepage: https://github.com/JetBrains/ruby-debug-ide
         
     | 
| 
       81 
68 
     | 
    
         
             
            licenses: []
         
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
69 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       84 
70 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
            require_paths: 
         
     | 
| 
      
 71 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       87 
72 
     | 
    
         
             
            - lib
         
     | 
| 
       88 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 73 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       89 
74 
     | 
    
         
             
              none: false
         
     | 
| 
       90 
     | 
    
         
            -
              requirements: 
     | 
| 
       91 
     | 
    
         
            -
              - -  
     | 
| 
       92 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       93 
     | 
    
         
            -
                  hash: 51
         
     | 
| 
       94 
     | 
    
         
            -
                  segments: 
         
     | 
| 
       95 
     | 
    
         
            -
                  - 1
         
     | 
| 
       96 
     | 
    
         
            -
                  - 8
         
     | 
| 
       97 
     | 
    
         
            -
                  - 2
         
     | 
| 
      
 75 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 76 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 77 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
       98 
78 
     | 
    
         
             
                  version: 1.8.2
         
     | 
| 
       99 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 79 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       100 
80 
     | 
    
         
             
              none: false
         
     | 
| 
       101 
     | 
    
         
            -
              requirements: 
     | 
| 
       102 
     | 
    
         
            -
              - -  
     | 
| 
       103 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       104 
     | 
    
         
            -
                  hash: 25
         
     | 
| 
       105 
     | 
    
         
            -
                  segments: 
         
     | 
| 
       106 
     | 
    
         
            -
                  - 1
         
     | 
| 
       107 
     | 
    
         
            -
                  - 3
         
     | 
| 
       108 
     | 
    
         
            -
                  - 1
         
     | 
| 
      
 81 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 82 
     | 
    
         
            +
              - - ! '>'
         
     | 
| 
      
 83 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
       109 
84 
     | 
    
         
             
                  version: 1.3.1
         
     | 
| 
       110 
85 
     | 
    
         
             
            requirements: []
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
86 
     | 
    
         
             
            rubyforge_project: debug-commons
         
     | 
| 
       113 
     | 
    
         
            -
            rubygems_version: 1.8. 
     | 
| 
      
 87 
     | 
    
         
            +
            rubygems_version: 1.8.6
         
     | 
| 
       114 
88 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       115 
89 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       116 
90 
     | 
    
         
             
            summary: IDE interface for ruby-debug.
         
     | 
| 
       117 
91 
     | 
    
         
             
            test_files: []
         
     | 
| 
       118 
     | 
    
         
            -
             
     |