Skip to content

Commit beea10b

Browse files
committed
--skip-value-attr so it is possible to enable this extension alone
1 parent 2499b4a commit beea10b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

bin/rdebug-ide

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ options = OpenStruct.new(
2121
'dispatcher_port' => -1,
2222
'evaluation_timeout' => 10,
2323
'rm_protocol_extensions' => false,
24-
'catchpoint_deleted_event' => false
24+
'catchpoint_deleted_event' => false,
25+
'skip_value_attr' => false
2526
)
2627

2728
opts = OptionParser.new do |opts|
@@ -62,6 +63,9 @@ EOB
6263
opts.on("--catchpoint-deleted-event", "Enable chatchpointDeleted event") do
6364
options.catchpoint_deleted_event = true
6465
end
66+
opts.on("--skip-value-attr", "Allow to skip value attribute in variable representation") do
67+
options.skip_value_attr = true
68+
end
6569
opts.separator ""
6670
opts.separator "Common options:"
6771
opts.on_tail("-v", "--version", "Show version") do
@@ -122,6 +126,7 @@ Debugger.tracing = options.tracing
122126
Debugger.evaluation_timeout = options.evaluation_timeout
123127
Debugger.rm_protocol_extensions = options.rm_protocol_extensions
124128
Debugger.catchpoint_deleted_event = options.catchpoint_deleted_event || options.rm_protocol_extensions
129+
Debugger.skip_value_attr = options.skip_value_attr || options.rm_protocol_extensions
125130

126131
Debugger.debug_program(options)
127132

lib/ruby-debug-ide.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def cleanup_backtrace(backtrace)
4545
attr_accessor :control_thread
4646
attr_reader :interface
4747
# protocol extensions
48-
attr_accessor :catchpoint_deleted_event
48+
attr_accessor :catchpoint_deleted_event, :skip_value_attr
4949

5050

5151
#

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def safe_to_string(value)
398398
end
399399

400400
def build_value_attr(escaped_value_str)
401-
Debugger.rm_protocol_extensions ? '' : "value=\"#{escaped_value_str}\""
401+
Debugger.skip_value_attr ? '' : "value=\"#{escaped_value_str}\""
402402
end
403403

404404
instance_methods.each do |m|

0 commit comments

Comments
 (0)