Skip to content

Commit

Permalink
--skip-value-attr so it is possible to enable this extension alone
Browse files Browse the repository at this point in the history
  • Loading branch information
os97673 committed Jul 24, 2015
1 parent 2499b4a commit beea10b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion bin/rdebug-ide
Expand Up @@ -21,7 +21,8 @@ options = OpenStruct.new(
'dispatcher_port' => -1,
'evaluation_timeout' => 10,
'rm_protocol_extensions' => false,
'catchpoint_deleted_event' => false
'catchpoint_deleted_event' => false,
'skip_value_attr' => false
)

opts = OptionParser.new do |opts|
Expand Down Expand Up @@ -62,6 +63,9 @@ EOB
opts.on("--catchpoint-deleted-event", "Enable chatchpointDeleted event") do
options.catchpoint_deleted_event = true
end
opts.on("--skip-value-attr", "Allow to skip value attribute in variable representation") do
options.skip_value_attr = true
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail("-v", "--version", "Show version") do
Expand Down Expand Up @@ -122,6 +126,7 @@ Debugger.tracing = options.tracing
Debugger.evaluation_timeout = options.evaluation_timeout
Debugger.rm_protocol_extensions = options.rm_protocol_extensions
Debugger.catchpoint_deleted_event = options.catchpoint_deleted_event || options.rm_protocol_extensions
Debugger.skip_value_attr = options.skip_value_attr || options.rm_protocol_extensions

Debugger.debug_program(options)

2 changes: 1 addition & 1 deletion lib/ruby-debug-ide.rb
Expand Up @@ -45,7 +45,7 @@ def cleanup_backtrace(backtrace)
attr_accessor :control_thread
attr_reader :interface
# protocol extensions
attr_accessor :catchpoint_deleted_event
attr_accessor :catchpoint_deleted_event, :skip_value_attr


#
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby-debug-ide/xml_printer.rb
Expand Up @@ -398,7 +398,7 @@ def safe_to_string(value)
end

def build_value_attr(escaped_value_str)
Debugger.rm_protocol_extensions ? '' : "value=\"#{escaped_value_str}\""
Debugger.skip_value_attr ? '' : "value=\"#{escaped_value_str}\""
end

instance_methods.each do |m|
Expand Down

0 comments on commit beea10b

Please sign in to comment.