ruby-debug-ide 0.1.8 → 0.1.9

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.
@@ -17,7 +17,7 @@ options = OpenStruct.new(
17
17
  opts = OptionParser.new do |opts|
18
18
  opts.banner = <<EOB
19
19
  Using ruby-debug-base #{Debugger::VERSION}
20
- Usage: rdebug-javaide is supposed to be called from RDT or NetBeans. The command line interface to ruby-debug is rdebug.
20
+ Usage: rdebug-ide is supposed to be called from RDT or NetBeans. The command line interface to ruby-debug is rdebug.
21
21
  EOB
22
22
  opts.separator ""
23
23
  opts.separator "Options:"
@@ -71,4 +71,5 @@ trap('INT') { Debugger.interrupt_last }
71
71
  # set options
72
72
  Debugger.keep_frame_binding = options.frame_bind
73
73
 
74
- Debugger.main(options.host, options.port)
74
+ Debugger.main(options.host, options.port)
75
+
@@ -2,7 +2,7 @@ require 'pp'
2
2
  require 'stringio'
3
3
  require "socket"
4
4
  require 'thread'
5
- require 'ruby_debug.so'
5
+ require 'ruby-debug-base'
6
6
  require 'ruby-debug/xml_printer'
7
7
  require 'ruby-debug/processor'
8
8
  require 'ruby-debug/event_processor'
@@ -92,9 +92,10 @@ module Debugger
92
92
  def debug_eval(str, b = get_binding)
93
93
  begin
94
94
  max_time = 10
95
+ to_inspect = str.gsub(/\\n/, "\n")
95
96
  @printer.print_debug("Evaluating with timeout after %i sec", max_time)
96
97
  timeout(max_time) do
97
- eval(str, b)
98
+ eval(to_inspect, b)
98
99
  end
99
100
  rescue StandardError, ScriptError => e
100
101
  @printer.print_exception(e, @state.binding)
@@ -7,9 +7,12 @@ module Debugger
7
7
  end
8
8
 
9
9
  def execute
10
- @printer.print_msg("finished")
11
- @printer.print_debug("Exiting debugger.")
12
- exit! # exit -> exit!: No graceful way to stop threads...
10
+ begin
11
+ @printer.print_msg("finished")
12
+ @printer.print_debug("Exiting debugger.")
13
+ ensure
14
+ exit! # exit -> exit!: No graceful way to stop threads...
15
+ end
13
16
  end
14
17
 
15
18
  class << self
@@ -123,4 +126,4 @@ module Debugger
123
126
  end
124
127
  end
125
128
  end
126
- end
129
+ end
@@ -96,7 +96,7 @@ module Debugger
96
96
  end
97
97
 
98
98
  def print_variable(name, value, kind)
99
- if nil == value then
99
+ if value == nil
100
100
  print("<variable name=\"%s\" kind=\"%s\"/>", CGI.escapeHTML(name), kind)
101
101
  return
102
102
  end
@@ -113,10 +113,12 @@ module Debugger
113
113
  if value_str =~ /^\"(.*)"$/
114
114
  value_str = $1
115
115
  end
116
+ value_str ||= "nil"
116
117
  end
117
118
  value_str = "[Binary Data]" if value_str.is_binary_data?
118
119
  print("<variable name=\"%s\" kind=\"%s\" value=\"%s\" type=\"%s\" hasChildren=\"%s\" objectId=\"%#+x\"/>",
119
- CGI.escapeHTML(name), kind, CGI.escapeHTML(value_str), value.class, has_children, value.object_id)
120
+ CGI.escapeHTML(name), kind, CGI.escapeHTML(value_str), value.class,
121
+ has_children, value.respond_to?(:object_id) ? value.object_id : value.id)
120
122
  end
121
123
 
122
124
  def print_breakpoints(breakpoints)
@@ -210,7 +212,7 @@ module Debugger
210
212
 
211
213
  def print_inspect(eval_result)
212
214
  print_element("variables") do
213
- print_variable("eval_result", eval_result, 'locale')
215
+ print_variable("eval_result", eval_result, 'local')
214
216
  end
215
217
  end
216
218
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: ruby-debug-ide
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.8
7
- date: 2007-07-20 15:28:57 +02:00
6
+ version: 0.1.9
7
+ date: 2007-10-26 11:59:40 +02:00
8
8
  summary: IDE interface for ruby-debug.
9
9
  require_paths:
10
10
  - lib