ruby-debug-ide 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/rdebug-ide +3 -2
- data/lib/ruby-debug.rb +1 -1
- data/lib/ruby-debug/command.rb +2 -1
- data/lib/ruby-debug/commands/control.rb +7 -4
- data/lib/ruby-debug/xml_printer.rb +5 -3
- metadata +2 -2
data/bin/rdebug-ide
CHANGED
@@ -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-
|
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
|
+
|
data/lib/ruby-debug.rb
CHANGED
data/lib/ruby-debug/command.rb
CHANGED
@@ -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(
|
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
|
-
|
11
|
-
|
12
|
-
|
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
|
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
|
-
|
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, '
|
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.
|
7
|
-
date: 2007-
|
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
|