ruby-debug-ide 0.3.4 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,10 @@ EOB
27
27
  opts.on("-x", "--trace", "turn on line tracing") {options.tracing = true}
28
28
  opts.on("-l", "--load-mode", "load mode (experimental)") {options.load_mode = true}
29
29
  opts.on("-d", "--debug", "Debug self - prints information for debugging ruby-debug itself") do
30
- Debugger.is_debug = true
30
+ Debugger.cli_debug = true
31
+ end
32
+ opts.on("--xml-debug", "Debug self - sends information <message>s for debugging ruby-debug itself") do
33
+ Debugger.xml_debug = true
31
34
  end
32
35
  opts.on("-I", "--include PATH", String, "Add PATH to $LOAD_PATH") do |path|
33
36
  $LOAD_PATH.unshift(path)
@@ -12,7 +12,7 @@ module Debugger
12
12
  class << self
13
13
  # Prints to the stderr using printf(*args) if debug logging flag (-d) is on.
14
14
  def print_debug(*args)
15
- if Debugger.is_debug
15
+ if Debugger.cli_debug
16
16
  $stderr.printf(*args)
17
17
  $stderr.printf("\n")
18
18
  $stderr.flush
@@ -53,7 +53,8 @@ module Debugger
53
53
  end
54
54
 
55
55
  class << self
56
- attr_accessor :event_processor, :is_debug
56
+
57
+ attr_accessor :event_processor, :cli_debug, :xml_debug
57
58
  attr_reader :control_thread
58
59
 
59
60
  #
@@ -93,11 +94,7 @@ module Debugger
93
94
  @proceed.wait(@mutex)
94
95
  end
95
96
 
96
- bt = debug_load(Debugger::PROG_SCRIPT, false, load_mode)
97
- if bt
98
- $stderr.print bt.backtrace.map{|l| "\t#{l}"}.join("\n"), "\n"
99
- $stderr.print "Uncaught exception: #{bt}\n"
100
- end
97
+ debug_load(Debugger::PROG_SCRIPT, false, load_mode)
101
98
  end
102
99
 
103
100
  def run_prog_script
@@ -114,8 +111,7 @@ module Debugger
114
111
  unless RUBY_PLATFORM =~ /darwin/i # Mac OS X seems to have problem with 'localhost'
115
112
  host ||= 'localhost' # nil does not seem to work for IPv6, localhost does
116
113
  end
117
- Debugger.print_debug("Waiting for connection on '#{host}:#{port}'")
118
- $stderr.printf "Fast Debugger (ruby-debug-ide 0.3.4) listens on #{host}:#{port}\n"
114
+ $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.0) listens on #{host}:#{port}\n"
119
115
  server = TCPServer.new(host, port)
120
116
  while (session = server.accept)
121
117
  begin
@@ -15,7 +15,16 @@ module Debugger
15
15
  xml_message = CGI.escapeHTML(msg % args)
16
16
  print "<message>#{xml_message}</message>"
17
17
  end
18
-
18
+
19
+ # Sends debug message to the frontend if XML debug logging flag (--xml-debug) is on.
20
+ def print_debug(*args)
21
+ if Debugger.xml_debug
22
+ msg, *args = args
23
+ xml_message = CGI.escapeHTML(msg % args)
24
+ @interface.print("<message debug='true'>#{xml_message}</message>")
25
+ end
26
+ end
27
+
19
28
  def print_error(*args)
20
29
  print_element("error") do
21
30
  msg, *args = args
@@ -23,11 +32,6 @@ module Debugger
23
32
  end
24
33
  end
25
34
 
26
- # Convenient delegate to Debugger#print_debug
27
- def print_debug(*args)
28
- Debugger.print_debug(*args)
29
- end
30
-
31
35
  def print_frames(context, cur_idx)
32
36
  print_element("frames") do
33
37
  (0...context.stack_size).each do |idx|
@@ -251,7 +255,7 @@ module Debugger
251
255
  private
252
256
 
253
257
  def print(*params)
254
- print_debug(*params)
258
+ Debugger::print_debug(*params)
255
259
  @interface.print(*params)
256
260
  end
257
261
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-ide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Barchfeld, Martin Krauskopf
@@ -9,7 +9,7 @@ autorequire: ruby-debug-base
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-13 00:00:00 +01:00
12
+ date: 2008-10-31 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -18,9 +18,9 @@ dependencies:
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
- - - ~>
21
+ - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.10.3.0
23
+ version: 0.10.2
24
24
  version:
25
25
  description: An interface which glues ruby-debug to IDEs like Eclipse (RDT) and NetBeans.
26
26
  email: rubyeclipse-dev-list@sourceforge.net
@@ -31,11 +31,6 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
 
33
33
  files:
34
- - CHANGES
35
- - ChangeLog
36
- - ChangeLog.archive
37
- - MIT-LICENSE
38
- - Rakefile
39
34
  - bin/rdebug-ide
40
35
  - lib/ruby-debug
41
36
  - lib/ruby-debug/xml_printer.rb
@@ -59,15 +54,6 @@ files:
59
54
  - lib/ruby-debug/helper.rb
60
55
  - lib/ruby-debug/event_processor.rb
61
56
  - lib/ruby-debug.rb
62
- - test/rd_basic_test.rb
63
- - test/rd_test_base.rb
64
- - test/rd_inspect_test.rb
65
- - test/rd_catchpoint_test.rb
66
- - test/rd_enable_disable_test.rb
67
- - test/rd_threads_and_frames_test.rb
68
- - test/rd_condition_test.rb
69
- - test/rd_stepping_breakpoints_test.rb
70
- - test/rd_variables_test.rb
71
57
  has_rdoc: false
72
58
  homepage: http://rubyforge.org/projects/debug-commons/
73
59
  post_install_message:
@@ -90,9 +76,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
76
  requirements: []
91
77
 
92
78
  rubyforge_project: debug-commons
93
- rubygems_version: 1.3.1.1988
79
+ rubygems_version: 1.3.0.1904
94
80
  signing_key:
95
- specification_version: 3
81
+ specification_version: 2
96
82
  summary: IDE interface for ruby-debug.
97
83
  test_files: []
98
84
 
data/CHANGES DELETED
@@ -1,75 +0,0 @@
1
- This document is not maintained since version 0.1.10. See ``Changes'' section
2
- in the ``ruby-debug-ide protocol'' document:
3
-
4
- http://debug-commons.rubyforge.org/protocol-spec.html
5
-
6
- and ChangeLog for details. protocol-spec.html is generated from
7
- doc/protocol-spec.texi file.
8
-
9
- ========================================================================
10
-
11
- 0.1.9 - 0.1.10
12
- --------------
13
-
14
- * fixed bug when inspected variable's to_s methods returns non-String.
15
- Returns diagonstic message now.
16
- * do not use '==' from within debugger to prevent runtime error
17
- * Workarounding JRuby issue (http://jira.codehaus.org/browse/JRUBY-2063)
18
- * switching to ruby-debug-base 0.1.10 (all tests pass)
19
-
20
- 0.1.8 - 0.1.9
21
- -------------
22
-
23
- * be sure 'exit' is always called.
24
- * to_inspect = str.gsub(/\\n/, "\n") in debug_eval() to make possible to
25
- evaluate multiline expressions. Frontend must escape new lines
26
- accordingly.
27
- * prevent exception when to_s returns nil on being evaluated value
28
-
29
- 0.1.7 - 0.1.8
30
- -------------
31
-
32
- * fixed error during breakpoint removing
33
- * (protocols merge) print debug message on $stderr like classic debugger
34
-
35
- 0.1.6 - 0.1.7
36
- -------------
37
-
38
- * ensure 'yaml' (is_binary_data?) is always loaded in xml_printer.rb
39
- * VarInstanceCommand enumerates also variables of an object's class, as it
40
- is done in the classic-debugger
41
- * do not send unneeded end-of-lines (fast and classic protocol merging)
42
- * do not send non-xml PROMPT and CONFIRM + getting rid of 'confirm' methods
43
- in the whole codebase (fast and classic protocol merging)
44
- * send info <message> when 'delete' is used without given 'pos' (deleting of
45
- all breakpoints is not supported)
46
- * return <error> on 'delete <negative_int>' (protocol unification)
47
- * always use one-based frame numbering (was not the case in <frame[s]>)
48
- * send message 'finished' back when exiting
49
-
50
- 0.1.5 - 0.1.6
51
- -------------
52
-
53
- * do not send binary data within values of variables. See
54
- http://www.netbeans.org/nonav/issues/show_bug.cgi?id=101748 for more
55
- details
56
-
57
- 0.1.4 - 0.1.5
58
- -------------
59
-
60
- * fixed subtle bug in xml_printer.rb#print_variable which caused the
61
- debugger to die when == method was overridden and did not count on nil
62
- parameters
63
- * Hash and Array subclasses did not have children thus cannot be expanded in
64
- a GUI. E.g. @params in Rails controller (HashWithIndifferentAccess)
65
-
66
- 0.1.3 - 0.1.4
67
- -------------
68
-
69
- * migration to ruby-debug 0.1.4
70
-
71
- 0.1.2 - 0.1.3
72
- -------------
73
-
74
- * adding step+ and next+ commands (since ruby-debug 0.9.1)
75
-
data/ChangeLog DELETED
@@ -1,267 +0,0 @@
1
- 2009-01-13 12:52 Martin Krauskopf
2
-
3
- * lib/ruby-debug.rb: backporting fixes from trunk
4
-
5
- 2009-01-13 12:33 Martin Krauskopf
6
-
7
- * ChangeLog, Rakefile: Changes for 0.3.x
8
-
9
- 2009-01-13 12:24 Martin Krauskopf
10
-
11
- * Rakefile: Release appropriate files like license, tests, changes,
12
- ... withing the gem.
13
-
14
- 2009-01-13 12:19 Martin Krauskopf
15
-
16
- * Rakefile, etc/build_and_install.sh, lib/ruby-debug.rb,
17
- test/rd_test_base.rb: 1) backporting bugfix: print out backtrace
18
- when debuggee fails. 2) version to 0.3.4
19
-
20
- 2008-12-19 08:41 Martin Krauskopf
21
-
22
- * Rakefile, etc/build_and_install.sh, lib/ruby-debug.rb,
23
- test/rd_test_base.rb: Depends on the "~> 0.10.3.x", rather then
24
- on 0.10.3 exactly. Increasing version to 0.3.3.
25
-
26
- 2008-12-19 08:38 Martin Krauskopf
27
-
28
- * .: better name for 0.3.x support branch
29
-
30
- 2008-11-24 12:51 Martin Krauskopf
31
-
32
- * ruby-debug-ide 0.3.x depending on 0.10.3 so it works with JRuby
33
- 1.1.5
34
-
35
- 2008-11-24 12:16 Martin Krauskopf
36
-
37
- * update to revision 561 (0.3.1)
38
-
39
- 2008-11-24 12:13 Martin Krauskopf
40
-
41
- * 0.3.2 branch based on 0.3.0 tag
42
-
43
- 2008-09-08 15:19 Martin Krauskopf
44
-
45
- * Tagging 0.3.0 release of ruby-debug-ide
46
-
47
- 2008-09-08 15:17 Martin Krauskopf
48
-
49
- * ChangeLog update before 0.3.0 release
50
-
51
- 2008-09-05 11:52 Martin Krauskopf
52
-
53
- * Setting catchpoint now answers with <conditionSet> instead of
54
- just <message> providing better control at frontend side.
55
- Increasing version to 0.3.0 (incompatible protocol change)
56
-
57
- 2008-09-03 14:14 Martin Krauskopf
58
-
59
- * Do not swallow exceptions
60
-
61
- 2008-09-02 18:24 Martin Krauskopf
62
-
63
- * Be sure socket is flushed during tests
64
-
65
- 2008-09-02 13:55 Martin Krauskopf
66
-
67
- * ruby-debug-base fixes stepping behaviour. Re-enabling common
68
- tests again
69
-
70
- 2008-09-02 13:54 Martin Krauskopf
71
-
72
- * Do not hardcode port for test server. Find always free one to
73
- prevent batch test fails.
74
-
75
- 2008-09-02 13:49 Martin Krauskopf
76
-
77
- * Tweaking NetBeans project metadata to include bin directory as a
78
- source root
79
-
80
- 2008-09-02 13:48 Martin Krauskopf
81
-
82
- * Switching trunk dependency on recently released ruby-debug-base
83
- 0.10.2
84
-
85
- 2008-08-12 16:10 Martin Krauskopf
86
-
87
- * Switching trunk to 0.2.2
88
-
89
- 2008-08-12 16:00 Martin Krauskopf
90
-
91
- * debugging is terminated when object's to_s method raises an
92
- exception
93
-
94
- 2008-07-31 15:10 Martin Krauskopf
95
-
96
- * ignore private folder
97
-
98
- 2008-07-31 15:09 Martin Krauskopf
99
-
100
- * Adding NetBeans project metadata.
101
-
102
- 2008-07-31 13:39 Martin Krauskopf
103
-
104
- * - pushing changes to website
105
- - fixing typo s/workardouning/workarounding
106
-
107
- 2008-07-31 13:23 Martin Krauskopf
108
-
109
- * ChangeLog update before tagging 0.2.1
110
-
111
- 2008-07-31 13:20 Martin Krauskopf
112
-
113
- * Updating Changes between 0.2.0 and 0.2.1
114
-
115
- 2008-07-31 13:13 Martin Krauskopf
116
-
117
- * tweaking tests for bugs in MRI to catch it once it is fixed
118
-
119
- 2008-07-31 13:12 Martin Krauskopf
120
-
121
- * Hotfixing problem with running Ruby on Mac. See 'Debugger timing
122
- out' thread:
123
- http://ruby.netbeans.org/servlets/BrowseList?list=users&by=thread&from=861334
124
- Still continuing on 0.2.x row (changing dependeny on
125
- ruby-debug-base back to 0.10.1)
126
-
127
- 2008-07-14 22:40 Martin Krauskopf
128
-
129
- * Make trunk dependent on ruby-debug-base 0.10.2 which fixed
130
- important "finish" bug
131
-
132
- 2008-06-22 07:10 Martin Krauskopf
133
-
134
- * increasing trunk version to 0.2.1
135
- - CHANGES no longer maintained
136
-
137
- 2008-06-22 06:58 Martin Krauskopf
138
-
139
- * ChangeLog update before tagging 0.2.0
140
-
141
- 2008-06-17 12:40 Martin Krauskopf
142
-
143
- * Fixing test loadpath
144
-
145
- 2008-06-17 11:52 Martin Krauskopf
146
-
147
- * New version of Rubies (Ruby 1.8.7 and JRuby 1.1.2) handle stack
148
- differently
149
-
150
- 2008-06-17 09:20 Martin Krauskopf
151
-
152
- * s/Debugger::VERSION/0.2.0; former one points to ruby-debug-base
153
- version
154
-
155
- 2008-06-12 06:41 Martin Krauskopf
156
-
157
- * New version will be 0.2.0, since there is slight incompatible
158
- change (see spec)
159
-
160
- 2008-05-23 12:48 Martin Krauskopf
161
-
162
- * - documenting catchpoitns
163
- - mentioning "catch off" in uncompatible changes
164
-
165
- 2008-05-21 14:01 Martin Krauskopf
166
-
167
- * Adding test for catchpoint
168
-
169
- 2008-05-21 13:32 Martin Krauskopf
170
-
171
- * s/0.1.1/trunk (not sure whether it will be 0.1.11 or 0.2.0)
172
- - since tag for enable/disable command
173
-
174
- 2008-05-21 13:22 Martin Krauskopf
175
-
176
- * - enabled/disable breakpoint feature
177
- - typo in delete command
178
-
179
- 2008-05-21 13:21 Martin Krauskopf
180
-
181
- * Enabled/Disable breakpoint feature
182
-
183
- 2008-05-21 12:39 Martin Krauskopf
184
-
185
- * Deleting Breakpoint
186
-
187
- 2008-05-17 21:06 Martin Krauskopf
188
-
189
- * - changes section
190
- - continuing with protocol description
191
-
192
- 2008-05-17 21:04 Martin Krauskopf
193
-
194
- * Tweaking catchpoint.rb and addng basic test
195
-
196
- 2008-05-15 20:59 Martin Krauskopf
197
-
198
- * I've got the deadlock suggesting that Debugger::DebuggerThread
199
- instance was being traced from tests. Putting 'assertion'
200
- forbidding it
201
-
202
- 2008-05-15 20:56 Martin Krauskopf
203
-
204
- * Sanity check whether control thread starts up (#20121)
205
-
206
- 2008-05-15 14:13 Martin Krauskopf
207
-
208
- * - fixing version
209
- - RDEBUG_IDE variable
210
-
211
- 2008-05-15 13:52 Martin Krauskopf
212
-
213
- * Fixing 'cond' section
214
-
215
- 2008-05-15 10:58 Martin Krauskopf
216
-
217
- * Preventing possible race condition between a program thread and
218
- control thread
219
-
220
- 2008-05-14 21:16 Martin Krauskopf
221
-
222
- * State and ControlState does not need to keep commands' classes
223
- (they are used in CLI debugger from 'help' command)
224
-
225
- 2008-05-13 18:58 Martin Krauskopf
226
-
227
- * Some works on ruby-debug-ide protocol specification, far from
228
- complete
229
-
230
- 2008-05-13 18:04 Martin Krauskopf
231
-
232
- * Support for setting condition on breakpoints
233
- - condition.rb copy-pasted (then tweaked) from ruby-debug until
234
- we find better way
235
-
236
- 2008-05-09 14:56 Martin Krauskopf
237
-
238
- * - implementing Context#at_return to make 'finish' work with MRI
239
- (not used by JRuby yet)
240
- - tweaking test for different behaviours of interpreters
241
-
242
- 2008-05-08 21:40 Martin Krauskopf
243
-
244
- * Adding test for 'finish'. Currently does not work with MRI:
245
- ruby-debug issue: [#20039] Finish does not work correctly
246
-
247
- 2008-05-08 16:49 Martin Krauskopf
248
-
249
- * - switching trunk to ruby-debug-base(s) 0.10.1
250
- - remove README to pass the 'gem' task. So far we have no any
251
- README
252
-
253
- 2008-05-08 12:55 Martin Krauskopf
254
-
255
- * - archiving before-division ChangeLogs
256
- - ignore pkg and private configuration
257
-
258
- 2008-05-08 12:17 Martin Krauskopf
259
-
260
- * Dividing 'debug-commons' into two projects:
261
- - ruby-debug-ide: wrapper for ruby-debug-base
262
- - classic-debug-ide: wrapper for classic debug.rb
263
- to make further development more smooth. classic-debug-ide is
264
- getting
265
- deprecated by availability of ruby-debug-base for MRI, JRuby and
266
- Rubinius
267
-