Skip to content

Commit 9665253

Browse files
committed
disable memory limit in the same option
1 parent 5d0ac96 commit 9665253

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

bin/rdebug-ide

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,10 @@ EOB
3838
opts.separator "Options:"
3939

4040
ENV['DEBUGGER_MEMORY_LIMIT'] = '10'
41-
opts.on("-m", "--memory-limit LIMIT", "evaluation memory limit in mb (default: 10)") do |limit|
41+
opts.on("-m", "--memory-limit LIMIT", Integer, "evaluation memory limit in mb (default: 10)") do |limit|
4242
ENV['DEBUGGER_MEMORY_LIMIT'] = limit
4343
end
4444

45-
ENV['DEBUGGER_MEMORY_LIMIT_DISABLED'] = 'false'
46-
opts.on("--memory-limit-disable", "disables the memory check") {ENV['DEBUGGER_MEMORY_LIMIT_DISABLED'] = 'true'}
47-
48-
4945
opts.on("-h", "--host HOST", "Host name used for remote debugging") {|host| options.host = host}
5046
opts.on("-p", "--port PORT", Integer, "Port used for remote debugging") {|port| options.port = port}
5147
opts.on("--dispatcher-port PORT", Integer, "Port used for multi-process debugging dispatcher") do |dp|

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def inspect_with_allocation_control(slice, memory_limit)
409409
def compact_array_str(value)
410410
slice = value[0..10]
411411

412-
if (defined?(JRUBY_VERSION) || ENV['DEBUGGER_MEMORY_LIMIT_DISABLED'] == 'true')
412+
if (defined?(JRUBY_VERSION) || ENV['DEBUGGER_MEMORY_LIMIT'].to_i <= 0)
413413
compact = slice.inspect
414414
else
415415
compact = inspect_with_allocation_control(slice, ENV['DEBUGGER_MEMORY_LIMIT'].to_i)

0 commit comments

Comments
 (0)