ruby-debug-ide 0.7.0.beta4 → 0.7.0.beta6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcd16a3be5a13bc73a6ad876ae14ff2fd4fb6ede
4
- data.tar.gz: 7d35492d5109313d055b692bf7511faac90f8971
3
+ metadata.gz: 255f62070c2ea02e2d2e1e973e1b4a688ad5acb5
4
+ data.tar.gz: bda6489b589198e82ef8c76500d20c98546094cc
5
5
  SHA512:
6
- metadata.gz: 3bef85fe34f75f9da9ad5bc023209c15736003528dc6e1652c03a63f63c3134f8ef5967ea0cbbefe21698ae9205c0d46d2bf35732fe30f26927bb972254f6c3e
7
- data.tar.gz: 6be446a5fe8eb26442aec3856aab0ebe5d458f7d6a9c1de0269bf7315b6d19914bab4ea892bb408d03a39aaf36a7a63ec53454d525c5bf729c934f213edb98b5
6
+ metadata.gz: dcd0da624f59ba503601743f9a7809e0548ce2eab7c14cb2a80ca60cb4ca41744787eae61aea2069e4f397ffdd6c48386061fd03bb154fcc5bac91444f1ed590
7
+ data.tar.gz: 060d148ae4a201d233a1c0da8e770e67416626de67225ec48a2a03d4742a351b761d5b6a9c9db215703a9d966d6cb8088ae39b5ee858051ba9bf79a0659ba6bf
data/Gemfile CHANGED
@@ -13,7 +13,7 @@ end
13
13
  gem "ruby-debug-base", :platforms => [:jruby, *mries('18')]
14
14
  gem "ruby-debug-base19x", ">= 0.11.32", :platforms => mries('19')
15
15
  if RUBY_VERSION && RUBY_VERSION >= "2.0"
16
- gem "debase", "~> 0.2.2", :platforms => mries('20', '21', '22', '23', '24', '25')
16
+ gem "debase", "~> 0.2", ">= 0.2.2", :platforms => mries('20', '21', '22', '23', '24', '25')
17
17
  end
18
18
 
19
19
  gemspec
@@ -27,7 +27,8 @@ options = OpenStruct.new(
27
27
  'catchpoint_deleted_event' => false,
28
28
  'value_as_nested_element' => false,
29
29
  'attach_mode' => false,
30
- 'cli_debug' => false
30
+ 'cli_debug' => false,
31
+ 'key_value_mode' => false
31
32
  )
32
33
 
33
34
  opts = OptionParser.new do |opts|
@@ -80,6 +81,9 @@ EOB
80
81
  opts.on("--attach-mode", "Tells that rdebug-ide is working in attach mode") do
81
82
  options.attach_mode = true
82
83
  end
84
+ opts.on("--key-value", "Key/Value presentation of hash items") do
85
+ options.key_value_mode = true
86
+ end
83
87
  opts.on("--ignore-port", "Generate another port") do
84
88
  options.ignore_port = true
85
89
  end
@@ -166,6 +170,7 @@ Debugger.debugger_memory_limit = options.debugger_memory_limit
166
170
  Debugger.inspect_time_limit = options.inspect_time_limit
167
171
  Debugger.catchpoint_deleted_event = options.catchpoint_deleted_event || options.rm_protocol_extensions
168
172
  Debugger.value_as_nested_element = options.value_as_nested_element || options.rm_protocol_extensions
173
+ Debugger.key_value_mode = options.key_value_mode
169
174
 
170
175
  if options.attach_mode
171
176
  if Debugger::FRONT_END == "debase"
@@ -51,6 +51,7 @@ module Debugger
51
51
  end
52
52
 
53
53
  attr_accessor :attached
54
+ attr_accessor :key_value_mode
54
55
  attr_accessor :cli_debug, :xml_debug, :evaluation_timeout
55
56
  attr_accessor :trace_to_s, :debugger_memory_limit, :inspect_time_limit
56
57
  attr_accessor :control_thread
@@ -119,7 +120,7 @@ module Debugger
119
120
  # "localhost" and nil have problems on some systems.
120
121
  host ||= '127.0.0.1'
121
122
 
122
- server = notify_dispatcher_if_needed(host, port, notify_dispatcher) do |real_port, port_changed = false|
123
+ server = notify_dispatcher_if_needed(host, port, notify_dispatcher) do |real_port, port_changed|
123
124
  s = TCPServer.new(host, real_port)
124
125
  print_greeting_msg $stderr, host, real_port, port_changed ? "Subprocess" : "Fast" if defined? IDE_VERSION
125
126
  s
@@ -1,3 +1,3 @@
1
1
  module Debugger
2
- IDE_VERSION='0.7.0.beta4'
2
+ IDE_VERSION='0.7.0.beta6'
3
3
  end
@@ -144,19 +144,36 @@ module Debugger
144
144
  end
145
145
  end
146
146
 
147
- def print_hash(hash)
147
+ def do_print_hash_key_value(hash)
148
+ print_element("variables", {:type => 'hashItem'}) do
149
+ hash.each {|(k, v)|
150
+ print_variable('key', k, 'instance')
151
+ print_variable('value', v, 'instance')
152
+ }
153
+ end
154
+ end
155
+
156
+ def do_print_hash(hash)
148
157
  print_element("variables") do
149
- hash.keys.each {|k|
158
+ hash.each {|(k, v)|
150
159
  if k.class.name == "String"
151
160
  name = '\'' + k + '\''
152
161
  else
153
162
  name = exec_with_allocation_control(k, :to_s, OverflowMessageType::EXCEPTION_MESSAGE)
154
163
  end
155
- print_variable(name, hash[k], 'instance')
164
+ print_variable(name, v, 'instance')
156
165
  }
157
166
  end
158
167
  end
159
168
 
169
+ def print_hash(hash)
170
+ if Debugger.key_value_mode
171
+ do_print_hash_key_value(hash)
172
+ else
173
+ do_print_hash(hash)
174
+ end
175
+ end
176
+
160
177
  def print_string(string)
161
178
  print_element("variables") do
162
179
  if string.respond_to?('bytes')
@@ -243,6 +260,7 @@ module Debugger
243
260
 
244
261
  def print_variable(name, value, kind)
245
262
  name = name.to_s
263
+
246
264
  if value.nil?
247
265
  print("<variable name=\"%s\" kind=\"%s\"/>", CGI.escapeHTML(name), kind)
248
266
  return
@@ -280,6 +298,7 @@ module Debugger
280
298
  CGI.escapeHTML(name), build_compact_value_attr(value, value_str), kind,
281
299
  build_value_attr(escaped_value_str), value.class,
282
300
  has_children, value.object_id)
301
+
283
302
  print("<value><![CDATA[%s]]></value>", escaped_value_str) if Debugger.value_as_nested_element
284
303
  print('</variable>')
285
304
  rescue StandardError => e
@@ -439,10 +458,13 @@ module Debugger
439
458
  end
440
459
  end
441
460
 
442
- def print_element(name)
443
- print("<#{name}>")
461
+ def print_element(name, additional_tags = nil)
462
+ additional_tags_presentation = additional_tags.nil? ? ''
463
+ : additional_tags.map {|tag, value| " #{tag}=\"#{value}\""}.reduce(:+)
464
+
465
+ print("<#{name}#{additional_tags_presentation}>")
444
466
  begin
445
- yield
467
+ yield if block_given?
446
468
  ensure
447
469
  print("</#{name}>")
448
470
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-ide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.beta4
4
+ version: 0.7.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-27 00:00:00.000000000 Z
11
+ date: 2018-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake