shuky19 / sublime_debugger Goto Github PK
View Code? Open in Web Editor NEWInteractive debugger for sublime
License: Apache License 2.0
Interactive debugger for sublime
License: Apache License 2.0
" {
"caption": "Debugger: Start debugging rails",
"command": "debug",
"args": {"command":"start_debug_current_file"}
},
{
"caption": "Debugger: Start debugging (Current file)",
"command": "debug",
"args": {"command":"start_debug_current_file"}
},
"
Should be
{
"caption": "Debugger: Start debugging rails",
"command": "debug",
"args": {"command":"start_rails"}
},
{
"caption": "Debugger: Start debugging (Current file)",
"command": "debug",
"args": {"command":"start_debug_current_file"}
},
Looks like we have some overlapping functionality. It would be a good idea to merge both projects https://github.com/wvlia5/SublimeDebugger
$ gem install byebug --version'>=2.5.0'
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --version>=2.5.0
Environment (on desktop system #1): Linux/Ubuntu 14.04 ; rvm 1.26.0 (latest), ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux], current version of Ruby Gem byebug installed ; Sublime Text stable channel, build 3065 (single user license, registered).
Attempts to install sublime_debugger for Ruby on this desktop system "seem" to work, using ST's Package Installer (no installation errors or problems reported), but once installed, then subsequent attempts to start the Debugger with F6 for "current Ruby file" fail to Connect (actually, no messages are displayed in any debugger window, "nothing" happens in response to the keystroke).
By contrast, on my Sys-76 laptop (#2), configured exactly the same as "Environment (on desktop system)" above, which is able to start the Debugger on the same Ruby source file just fine -- so on this laptop system, I'm able to see and understand how this Debugger responds and starts on the F6 keystroke, and how to use it... So, works fine on my laptop (#2), but cannot make it work on desktop (#1).
I have Removed this package on this desktop system -- and even removed all ST-installed packages -- then reInstalled this Debugger, but still cannot get it to start with the keystroke (or any other way). No error or status messages at all (that I can find), and especially no "Connecting" message as seen on my laptop system.
Any advice or fix on how to (re)install on this desktop system (#1), why Debugger won't Connect? Thank you.
Can you make a new release on tag to release package control, please ?
i got byebug issue for require byebug core, and found fix it on github.
because i have installed via package control.
It will make many people happy.
Thank you for your great job, anyway.
In Rails 2, there's no script/rails in project folder, you can use "script/server" to start the server.
Hi bro of home,
If you use https://github.com/astashov/debugger-xml you could use the API of http://rubydoc.info/gems/ruby-debug-ide/0.4.22/frames.
This will make it much simpler to interact with the debugger.
This is a general question, not an issue with your package. In my opinion, the Python world is seriously lacking proper integration between their debuggers and their text editors, and your sublime_debugger is exactly what I had in mind. A similar package for GDB is SublimeGDB and there is SublimeLLDB for LLDB.
I'm not an expert on debuggers but I do need to use them. My question is: how difficult would it be to extract a "generic" debugger interface from sublime_debugger (or any of the others), so users could write simple plugin interfaces to their favorite debugger? My own interest is in Python, but I imagine you could plug in a debugger for any language.
In other words, how specific is sublime_debugger to the Ruby debugger?
Thanks!
I'm using byebug 4.05 (but get the same error with byebug5) with ruby 2.0.0p594 and sublime text 3
I have checked that my rails app runs correctly using the same rvm ruby as ruby debugger, and byebug triggers and runs (when using rake test on the command line)
as soon as I run an app (shift F6) I get the error below.
any suggestions?
thanks in advance.
Started process command: bash -c "'/Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/ruby_executor.sh' 'rvm' True '-C/Users/rob/Documents/Development/Rails/SetupHelp4' '-r/Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb' '-rbundler/setup' 'bin/rails' s"
Connecting...
----------------------------------------
------------Ruby Executor---------------
----------------------------------------
Method: RVM
Using ruby version: ruby 2.0.0p594 (2014-10-27 revision 48167) [x86_64-darwin14.1.0]
Located at: /Users/rob/.rvm/rubies/ruby-2.0.0-p594/bin/ruby
Ruby Arguments = -C/Users/rob/Documents/Development/Rails/SetupHelp4 -r/Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb -rbundler/setup bin/rails s
Connected
/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/interface.rb:65:in `write': closed stream (IOError)
Last exception: #<IOError: closed stream>
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/interface.rb:65:in `puts'
Backtrace:
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/interface.rb:65:in `puts'
["/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/interface.rb:65:in `write'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/interface.rb:65:in `puts'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/interface.rb:65:in `puts'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/commands/list.rb:116:in `display_lines'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/commands/list.rb:21:in `execute'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:79:in `block in always_run'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:78:in `each'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:78:in `always_run'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:87:in `process_commands'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:51:in `at_return'", "/Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/context.rb:94:in `at_return'", "/Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:14:in `block in <top (required)>'", "/Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:37:in `call'", "/Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:37:in `<top (required)>'", "/Users/rob/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'", "/Users/rob/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'"]
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/commands/list.rb:116:in `display_lines'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/commands/list.rb:21:in `execute'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:79:in `block in always_run'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:78:in `each'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:78:in `always_run'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:87:in `process_commands'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/processors/command_processor.rb:51:in `at_return'
from /Users/rob/.rvm/gems/ruby-2.0.0-p594/gems/byebug-4.0.5/lib/byebug/context.rb:94:in `at_return'
from /Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:14:in `block in <top (required)>'
from /Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:37:in `call'
from /Users/rob/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:37:in `<top (required)>'
from /Users/rob/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/rob/.rvm/rubies/ruby-2.0.0-p594/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
Debugger stopped
I've followed the instruction in the README and installed byebug
accordingly. But I cannot create connection in sublimetext, the error says:
Connecting...
Connection could not be made: [Errno 61] Connection refused
Byebug gem is not installed for ruby version: 2.0.0
please run 'gem install byebug' while using your default ruby version
I tried to start the byebug server manually, it works and accepts connection from the sublimetext.
Byebug.wait_connection = true; Byebug.start_server "127.0.0.1"
# when I initial connection in sublimetext
#<ConditionVariable:0x007f96858f8838 @waiters={}, @waiters_mutex=#<Mutex:0x007f96858f8748>>
I think it relates to this file.
As the title says. I don't see why the plugin shouldn't at least try to let me debug ruby 2.1.0. There aren't that many changes and byebug works just fine.
For a similar reason to:
http://stackoverflow.com/questions/15200165/how-to-use-the-debugger-with-ruby-2-0
I switched from debugger to byebug, it would be awesome for this tool to support byebug as well.. I must admit I've no idea whether the API is close to similar.
For now support for rails 4 is done only by using
StartDebug command and wrting 'bin/rails s'.
It should be supported built in.
Hi! After installing Sublime Debugger and running it, I get this error:
Connecting...
bash: /Users/myuser/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/ruby_executor.sh: Permission denied
Debugger stopped
Thanks in advance :)
"Hide debug windows - Alt+l, h" doesn`t work
As per the configuration in the issue title, I am not able to make this work in said environment.
Here is the error I am getting(pasted as is):
Started process command: bash -c "'/Users/noman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/ruby_executor.sh' 'rvm' True '-C/Volumes/Work/Ruby/stripe-ruby-mock' '-r/Users/noman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb' '-rbundler/setup' '/Volumes/Work/Ruby/Snippets/testing_local_stripe_ruby_mock.rb' "
Connecting...
----------------------------------------
------------Ruby Executor---------------
----------------------------------------
Method: RVM
Using ruby version: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin14.0]
Located at: /Users/noman/.rvm/rubies/ruby-2.1.0/bin/ruby
Ruby Arguments = -C/Volumes/Work/Ruby/stripe-ruby-mock -r/Users/noman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb -rbundler/setup /Volumes/Work/Ruby/Snippets/testing_local_stripe_ruby_mock.rb
/Users/noman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:14:in `block in <top (required)>': undefined method `wait_connection=' for Byebug:Module (NoMethodError)
from /Users/noman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:26:in `call'
from /Users/noman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:26:in `<top (required)>'
from /Users/noman/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/noman/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
Debugger stopped
I installed debugger gem, then Debugger: start debbuger rails. In output I can see that debugger is connected without any errors. But when I refresh a page, the debugger doesn't stop in breakpoint.
I'm using Rails 3.2.16, Ruby 1.9.3-p392 and rvm.
Should I do something more to make it work ?
It runs the command:
ruby -C/Users/sauron/git/sja -r/Users/sauron/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb -rbundler/setup bin/rails s
Then hangs. No rails process is started.
When I try to run the debugger, I get Ruby version: 1.8.7 is not supported.
.
I use rbenv
, which defaults to using 2.0. It sets this when I open a new shell, so I never have to worry about it.
Is there a way of making ruby run within the context of a shell?
Or, could there be a setting that lets me specify the absolute path of the ruby binary I want to use?
Thanks!
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"],
Here are my specs:
Item | Version |
---|---|
OS | Ubuntu 12.04.5 LTS |
Sublime Text | 2.0.2.2221 |
Ruby | ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] |
Python | 2.7.3 |
Sublime Debugger | 2f0ef5f |
Gems
bigdecimal (1.2.4)
bundler (1.6.2)
bundler-unload (1.0.2)
byebug (3.5.1)
clipboard (1.0.5)
coderay (1.1.0)
columnize (0.8.9)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.5)
diff-lcs (1.2.5)
executable-hooks (1.3.2)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.8.1)
method_source (0.8.2)
mini_portile (0.6.0)
minitest (4.7.5)
monads (0.0.1)
nokogiri (1.6.3.1)
pry (0.10.1)
pry-byebug (2.0.0)
psych (2.0.5)
rake (10.1.0)
rdoc (4.1.0)
rspec (3.0.0)
rspec-core (3.0.4)
rspec-expectations (3.0.4)
rspec-mocks (3.0.4)
rspec-support (3.0.4)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
slop (3.6.0)
test-unit (2.1.2.0)
uri_template (0.7.0)
Test program being used:
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:
def start_command(self, file_name, use_bundler=False):
is_legal, file_path, arguments = PathHelper.get_file(file_name, self.window)
print 'file_name={0}'.format(file_name)
print 'file_path={0}'.format(file_path)
print 'use_bundler={0}'.format(use_bundler)
...
file_name=/home/john/Documents/development/ruby-monads/sandbox2.rb
file_path=/home/john/Documents/development/ruby-monads/sandbox2.rb
use_bundler=False
Do you have any suggestions for resolving this issue? Do you require any further information or tests on my part?
Hi,
When i try to attach the debugger to the sublime session, it gives me the following error
Connecting...
Connection could not be made: [Errno 111] Connection refused
Debugger gem is not installed for ruby version: 1.9.3
please look for installation instructions here:
https://github.com/shuky19/sublime_debugger
the issue is it is looking for a 1.9.3 version of the debugger though i am running ruby 2.0 under rvm. Its 2 by default.
Any ideas why its looking for 1.9.3 while i am running in 2.0?
After clicking "Start debugging rails" I have the following error:
Traceback (most recent call last):
File "G:\Program Files\Sublime Text 3\sublime_plugin.py", line 524, in run_
return self.run(**args)
File "F:\Documents and Settings\Max Popov\Application Data\Sublime Text 3\Packages\Ruby Debugger\debug_command.py", line 60, in run
if PathHelper.file_exists("script/rails", self.window):
File "F:\Documents and Settings\Max Popov\Application Data\Sublime Text 3\Packages\Ruby Debugger\debugger\helpers\path_helper.py", line 11, in file_exists
elif path.isfile(path.join(window.folders()[0], file_name)):
IndexError: list index out of range
How it supposed to work?
So far I've only managed it to work this way: have running rails server with debug enabled. And if I choose to debug individual file (via F6), I'm able to connect to rails debugger and debug file. But after I click F8 - debugger is stopped, and stopped forever - I could not connect any more until I restart the rails server.
I guess "Start debugging rails" won't stop the debugger, and is more appropriate solution for me. But cannot get it to work so far...
Environment: Sublime 2, Ruby 2.1.2, Byebug 3.1.2 installed.
I just try to debug ruby code like that:
class C
def f a
a + 1
end
end
a = 1
C.new.f a
It doesn't work, I tried all commands but failed.
This is the log from SublimeLog:
=> => => Console logging activated (/Users/bachue/.subl.log). Timestamp: 10 Jun 2014, 00:22:01.
Exception in thread Thread-1722:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "./debug_command.py", line 88, 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 101, 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 46, in start
self.start_process(current_directory, file_name, args)
File "./debugger/ruby_imp/ruby_debugger_connector.py", line 97, in start_process
self.process = subprocess.Popen(" ".join(process_params), stdin = subprocess.PIPE, stderr = subprocess.PIPE, stdout=subprocess.PIPE, bufsize=1, shell=True, cwd=sublime.active_window().folders()[0])
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)
Connecting...
Connection could not be made: [Errno 111] Connection refused
Not able to figure out from this message whats the problem
I am using rvm
Ruby - 1.9.3
Sublime Text - 3 Build 3059
Rails - 3.2.11
Debugger 1.6.8
Already checked out post where its suggested starting sublime from terminal
I am using Gemsets
I started my sublime editor from the directory where it automatically loads my gems
Hi i just have started working with ruby on rails and sublime text. When using sublime_debugger plugin for debugging application controller, "#<NameError: uninitialized constant ActionController>" is shown and debugger has stopped working. Can anyone help me with this error? (I am using ruby 2.1.0 and installed byebug gem.)
Thanks in advance...
I've just installed your Ruby debugger (in Sublime 3 on Linux) along with the debugger and byebug gems, and even though I'm running Ruby 2.0.0p0, it says "Ruby version: is not supported." Do you have any idea what might be wrong?
(I've tried editing ruby_version_discoverer.rb and also the package settings within Sublime)
I would like to use the Sublime Debugger on a CLI app that I am working on, however I don't see any obvious way of doing that. Unlike Rails, it's not a long running process, and instead to jump into a debugger now, I add byebug
to the appropriate location, and then run a command such as my-cli --arg1 value --arg2 value
.
With Sublime Debugger, I can't seem to figure out how I would go about using the debugger with a script like this?
Currently using Ruby version 2.2.3 and Rails 4.2.0
I'm a newbie programmer so I didn't know (until just now) that ST itself had a console. Here's what comes up when I try to run debug:
Traceback (most recent call last):
File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 524, in run_
return self.run(**args)
File "/Users/joshuapenman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/debug_command.py", line 76, in run
self.start_command(self.window.active_view().file_name())
File "/Users/joshuapenman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/debug_command.py", line 87, in start_command
is_legal, file_path, arguments = PathHelper.get_file(file_name, self.window)
File "/Users/joshuapenman/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/debugger/helpers/path_helper.py", line 38, in get_file
elif path.isfile(path.join(window.folders()[0], file_name)):
IndexError: list index out of range
Thank you so much for building what seems to be an amazing tool!
Hi
When I start the debugger with alt-shift F6 the debug windows appear but in the sublime console is
Traceback (most recent call last):
File "/opt/sublime_text_3/sublime_plugin.py", line 524, in run_
return self.run(**args)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debug_command.py", line 67, in run
self.start_command(self.window.active_view().file_name())
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debug_command.py", line 78, in start_command
is_legal, file_path, arguments = PathHelper.get_file(file_name, self.window)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debugger/helpers/path_helper.py", line 20, in get_file
parts = command.split(" ")
AttributeError: 'NoneType' object has no attribute 'split'
Debugger is not functioning.
On Arch Linux
Using rvm. I've tried 1.9.3 & 2.0.0.
I used this gist
# Get Sublime Text to use your rvm ruby without hardcoding a `$USER`.
#
# Include the configurations below the commend in the appropriate file listed below:
#
# - OS X ST2: ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.sublime-build
# - OS X ST3: ~/Library/Application Support/Sublime Text 3/Packages/User/Ruby.sublime-build
# - Linux ST2: ~/.config/sublime-text-2/Packages/Ruby/Ruby.sublime-build
# - Linux ST3: ~/.config/sublime-text-3/Packages/User/Ruby.sublime-build
{
"working_dir": "${project_path}",
"env": {
"PATH": "${HOME}/.rvm/bin:${PATH}"
},
"cmd": [
"rvm-auto-ruby", "$file"
],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.ruby"
}
I have these gems installed
*** LOCAL GEMS ***
bigdecimal (1.2.0)
bundler (1.6.2)
bundler-unload (1.0.2)
columnize (0.8.9)
debugger (1.6.6)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.5)
executable-hooks (1.3.1)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
mysql2 (0.3.16)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.4.3)
rvm (1.11.3.9)
test-unit (2.0.0.0)
I used git clone into
.config/sublime-text-3/Packages/Ruby Debugger/
Any ideas ?
Edited to add:
I just realised 2.0.0 need byebug. I installed it but error as below
Traceback (most recent call last):
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debug_command.py", line 81, in <lambda>
sublime.set_timeout_async(lambda file_path=file_path,bundle=use_bundler, args=arguments: self.start_command_async(file_path, bundle, *args), 0)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debug_command.py", line 97, in start_command_async
self.debugger.run_command(DebuggerModel.COMMAND_START, PathHelper.get_pwd(file_path), file_path, *args)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debugger/ruby_imp/ruby_debugger.py", line 47, in run_command
RubyDebugger.COMMANDS[command_type].execute(self.connector, *args)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debugger/ruby_imp/ruby_custom_debug_command.py", line 10, in execute
self.lambda_command(debugger_constroller, *args)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debugger/ruby_imp/ruby_debugger.py", line 25, in <lambda>
DebuggerModel.COMMAND_START:RubyCustomDebugCommand(lambda debugger_constroller, *args: debugger_constroller.start(*args)),
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debugger/ruby_imp/ruby_debugger_connector.py", line 35, in start
self.start_process(current_directory, file_name, args)
File "/home/me/.config/sublime-text-3/Packages/Ruby Debugger/debugger/ruby_imp/ruby_debugger_connector.py", line 86, in start_process
self.process = subprocess.Popen(" ".join(process_params), stdin = subprocess.PIPE, stderr = subprocess.PIPE, stdout=subprocess.PIPE, bufsize=1, shell=True, cwd=sublime.active_window().folders()[0])
IndexError: list index out of range
Disclaimer: this is probably an issue with me, and not the software, so appologies where they are due.
I am running OS X 10.10 and Sublime Text 2. After installing sublime_debugger and attempting to start a debug session, I get the following output (which indicates I don't have byebug installed, but that's not the point, I also see issue #46 when i install byebug):
Connecting...
Byebug gem is not installed for ruby version: 2.0.0
please look for installation instructions here:
https://github.com/shuky19/sublime_debugger
Last exception: #<LoadError: cannot load such file -- byebug>
Backtrace:
["/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'", "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'", "/Users/ssheridan/Library/Application Support/Sublime Text 3/Packages/Ruby Debugger/sublime_debug_require.rb:18:in `<top (required)>'", "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'", "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'"]
So it appears that sublime_debugger wants to use the 2.0 system installed ruby distro. However, i'm using rbenv with version 1.9.3 in my project so I believe sublime_debugger should point to that distro.
I tried hacking in a symlink to the rbenv 1.9.3 install from the system location in the output above, but with no luck.
I see a 'Settings file' is on your todo list, is there any way to point sublime_debugger to the instance i want to use without that feature? Or else, is there a way to get past issue #46 and use the system default install of Ruby 2.0 to debug my rbenv 1.9.3 project (doesn't sound like what I want to do) ?
Thanks and apologies again for creating a probably unwarranted issue.
Hi Shuky,
I'm sorry to bother you again. When I set breakpoints and then tell the debugger to "continue," it finishes the program without stopping. Is this a bug, or am I not using this feature properly? I've also tried "run until cursor," but that doesn't seem to do it either.
Thanks,
Jay Davis
I'm trying to get rubydebugger plugin up and running on Win7 (x64), Ruby 2.0.0p451, byebug 3.1.2, SublimeText 2.0.1 and RubyDebugger 0.3.0.
Whenever I want to start the debugging session via Alt + Shift + F6
a dos windows with a Ruby process pops up and remains open, but nothing ever happens.
Looking at the console I see this:
Exception in thread Thread-16:
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 90, in <lambda>
File ".\debug_command.py", line 103, in start_command_async
File ".\debugger\ruby_imp\ruby_debugger.py", line 47, in run_command
File ".\debugger\ruby_imp\ruby_custom_debug_command.py", line 10, in execute
File ".\debugger\ruby_imp\ruby_debugger.py", line 25, in <lambda>
File ".\debugger\ruby_imp\ruby_debugger_connector.py", line 60, in start
File ".\debugger\ruby_imp\ruby_debugger_connector.py", line 124, in connect_debugger
File ".\debugger\interfaces\debugger_connector.py", line 17, in log_message
File ".\debugger\interfaces\debugger.py", line 19, in signal_text_result
File ".\debug_command.py", line 147, in add_text_result
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)
Any ideas?
I have install CFPropertyList in my ruby 2.0.0. but still showing error .
Connected
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find CFPropertyList-2.3.1 in any of the sources (Bundler::GemNotFound)
Last exception: #<Bundler::GemNotFound: Could not find CFPropertyList-2.3.1 in any of the sources>
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `map!'
Backtrace:
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `materialize'
["/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `map!'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `materialize'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in `specs'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in `specs_for'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:174:in `requested_specs'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/environment.rb:18:in `requested_specs'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in `setup'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler.rb:127:in `setup'", "/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/setup.rb:18:in `<top (required)>'", "/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'", "/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'", "/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'"]
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in `specs'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in `specs_for'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/definition.rb:174:in `requested_specs'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/environment.rb:18:in `requested_specs'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in `setup'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler.rb:127:in `setup'
from /Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/setup.rb:18:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
Debugger stopped
i asked this on stackoverflow, so rather than repeat here in issues, here's a link. i wonder if i have a path problem (rvm)? a py problem...?
http://stackoverflow.com/questions/21579750/sublimetext3-ruby-debugger
for some node-based javascript sublime plugins to work with nvm, i needed to add a path to to get them to find node... is there an analogous issue when using rvm?
Hi All,
When I use the sublime text 3 debugger debug my ruby scripts, I find thah sublime console view always show the debug exception msg like this:
Debugger exception: [WinError 10054] An existing connection was forcibly closed by the remote host
StackTrace: Traceback (most recent call last):
File "D:\userdata\j69wang\Application Data\Sublime Text 3\Packages\Ruby Debugger\debugger\ruby_imp\ruby_debugger_connector.py", line 181, in reader_thread
bytes = self.client.recv(4096)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Debugger stopped
ruby version is 2.0.0
debugger is newest
ruby gem debugger version is 1.6.8
Pls help me to resolve this bug.
Br,
Jayne Wang
I have changed my .bash_profile, .bashrc, confirmed that sublime is building using 1.9.3
Any ideas as to what is happening? Why is the debugger loading 1.8.7?
Thanks for the great project, I hope I will be able to test and enjoy it.
Looks like I missed a step, but I can't figure out where to look for logs or something that can help find the issue.
So I installed ruby 2.1.0 and byebug and ruby debugger for sublimetext on macOS 10.12.3, (sublime build 3126), opened a ruby file in sublimetext and started the debugging of current file.
Many windows appeared at the bottom but they all empty, nothing in Output.
I also changed settings of the package to show debug logs and changed rvm to rbenv, but still nothing in windows.
The only message that I noticed was "Stopping...". It appears if I select "Tools" -> "Build" and then if I start debugging it immediately says "Stopping...".
So what I missed?
When I start debugging wiht "Shift + F6" sublime seas it is connected to debugger:
Connecting...
Connected
=> Booting WEBrick
=> Rails 4.1.4 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[2014-07-29 19:42:42] INFO WEBrick 1.3.1
[2014-07-29 19:42:42] INFO ruby 2.1.2 (2014-05-08) [x86_64-linux]
[2014-07-29 19:42:42] INFO WEBrick::HTTPServer#start: pid=6342 port=3000
then I toggle braekpoint in controller action with F9, then I refresh page in browser and nothing!
Then I try to stop debugger with Alt+D,k. In sublime I got
Stopping...
and nothing! I must kill running ruby processes manually.
Try running the debugger in three sublime text on mac.
The result: Stopping...
Ruby version: 2.2.2 is not supported.
I am able to set breakpoints, step over, continue, etc. The console output also displays correctly.
However, when attempting to add a Watch on a value, such as params[:id] when stepping through a controller action, I cannot type in the Watch tab. None of the tabs appear to allow me to type any text in. Has anyone else ran into this issue?
Any help is appreciated.
I am using Sublime Text 3 Build 3083.
Thanks!
Hello Everyone:
I use my sublime on windows then import my ror project on ubuntu.
How can i use this sublime_debugger in my project ?
I always run F6 or shift F6 show error "Could not start process: [WinError 2] 系統找不到指定的檔案。".
If you know how to setting or solved. can you help me? Tks
I'm running Ruby 1.9.3 but when I start the rails debugger I get the following message asking for Byebug
"Connection could not be made: [Errno 61] Connection refused
Byebug gem is not installed for ruby version: 2.0.0
please look for installation instructions here:
https://github.com/shuky19/sublime_debugger"
install this plugin but i can't to know how to use it. i have rails app, install debugger and set the breakpoint press shift+f6 but it runs into rails script. if there is a video on how to use this plugin step-by-step would be helpful. tnx
Hi,
Installed your plugin. But all the menu points under Debugger are grayed out.
How can I fix this?
Rails 4.0.2
Sublime 2.0.2 / Build 2221
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.