Interactive debugger for sublime
A debugger plugin for interactive ruby and RoR debugging on Sublime Text.
In order to start debugging ruby or RoR applications all you need to do is to install Debugger plugin and press on F6 or Shift+F6 or Alt+Shift+F6
Here is a complete list of commands you can find Command Pallette under the
Debuggernamespace or in the menu under
Tools / Debugger:
Sublime Debugger relies on two seperate gems for diffirent ruby versions. For Ruby 1.9.3 you need the debugger gem, which can be installed using
gem install debugger, and for Ruby 2.0.0 you need the byebug gem, which can be installed using
gem install byebug.
I cannot test this against all ruby versions, so I only explicity support Ruby 1.9.3 and Ruby 2.0.0. RVM is a good way to have multiple ruby versions installed at once and switch between them when debugging or running normally. Sublime Debugger will use the ruby version that you set as default, so you must set either Ruby 1.9.3 or Ruby 2.0.0 as the default. Remember to reinstall the byebug or debugger gem when you change ruby versions, or else you will get an
Connection could not be made: [Errno ##] Connection refusederror.
If you need to have your ruby program running with an unspported ruby version you can manually add the version to the supported versions list. In the package's directory, which you can get to by going to
preferences -> browse packagesin sublime text and then opening the
Ruby Debuggerfolder, there is a
ruby_version_discoverer.rbfile where you can add your ruby version.
Execute "Package Control: Install Package" in the Command Pallette to retrieve a list of available packages. Search in the list and install package
Clone the repository by executing the following command in your Packages directory:
git clone https://github.com/shuky19/sublime_debugger.git "Ruby Debugger"
Get the latest source from GitHub and extract the source into your Packages directory to a folder named "Ruby Debugger".
Note: You can locate your Packages directory in the menu under
Preferences / Browse Packages...
Connection could not be made: [Errno 61] Connection refusedin the output window?
Well, Most of the reasons for this error come from environmental problems, following the steps below will help you fix it:
Errno::EADDRINUSE: Address already in use - bind(2)in the output window?
Either because there is another process running which is using ports 8989/8990 or the last debugger process is still alive (
killall rubywill solve that).
RubyDebugger is released under the MIT License.