I have recently started evaluating Sublime Text for some work we are doing in Ruby. I installed the sublime_debugger and when executing a test program (see below), I get an error in the console. "IndexError: list index out of range".
I should note that I am running a version of Ruby (2.1.2) which is technically unsupported by Sublime Text Debugger, however, the full minor (2.1.0) appears to be supported according to the contents of Ruby Debugger.sublime-settings. In order to allow 2.1.2 to be used I changed the following line in Ruby Debugger.sublime-settings
// Which ruby version are supported, by default listed here are the versions
// we already have checked.
// 2.1.2 Added Oct 22 by jee
"supported_ruby_versions": ["2.1.2","2.1.0", "2.0.0", "1.9.3"],
TestMe = Struct.new(:value) do
def repeat
[value, value, value].join('/')
end
end
puts "Hello World"
t = TestMe.new('hello')
puts t.repeat
puts t.repeat
Full call stack from console:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\threading.py", line 484, in run
File "./debug_command.py", line 92, in <lambda>
SublimeHelper.set_timeout_async(lambda file_path=file_path,bundle=use_bundler, args=arguments: self.start_command_async(file_path, bundle, *args), 0)
File "./debug_command.py", line 105, in start_command_async
self.debugger.run_command(DebuggerModel.COMMAND_START, PathHelper.get_pwd(file_path), file_path, *args)
File "./debugger/ruby_imp/ruby_debugger.py", line 47, in run_command
RubyDebugger.COMMANDS[command_type].execute(self.connector, *args)
File "./debugger/ruby_imp/ruby_custom_debug_command.py", line 10, in execute
self.lambda_command(debugger_constroller, *args)
File "./debugger/ruby_imp/ruby_debugger.py", line 25, in <lambda>
DebuggerModel.COMMAND_START:RubyCustomDebugCommand(lambda debugger_constroller, *args: debugger_constroller.start(*args)),
File "./debugger/ruby_imp/ruby_debugger_connector.py", line 47, in start
self.start_process(current_directory, file_name, args)
File "./debugger/ruby_imp/ruby_debugger_connector.py", line 106, in start_process
directory = " '-C"+sublime.active_window().folders()[0]+"'"
IndexError: list index out of range
Value of variables extracted by adding print statements:
I have recently started evaluating Sublime Text for some work we are doing in Ruby. I installed the sublime_debugger and when executing a test program (see below), I get an error in the console. "IndexError: list index out of range".
I should note that I am running a version of Ruby (2.1.2) which is technically unsupported by Sublime Text Debugger, however, the full minor (2.1.0) appears to be supported according to the contents of Ruby Debugger.sublime-settings. In order to allow 2.1.2 to be used I changed the following line in Ruby Debugger.sublime-settings
Here are my specs:
Gems
Test program being used:
Full call stack from console:
Value of variables extracted by adding print statements:
Do you have any suggestions for resolving this issue? Do you require any further information or tests on my part?