vim-ruby-debugger icon indicating copy to clipboard operation
vim-ruby-debugger copied to clipboard

Debugger terminates

Open tomaszwojcik opened this issue 12 years ago • 10 comments

Every time I run :Rdebugger I get message Command terminated. Tested with ruby 2.0 and 1.9.3 and mvim 7.4.

Any ideas why it happens?

tomaszwojcik avatar Aug 13 '13 13:08 tomaszwojcik

Log file contents (I noticed the rails part, however I want to run debugger for non-rails projects as well):

Vim plugin, 15:28:08: Executing :Rdebugger... Vim plugin, 15:28:08: Initializing Server object Vim plugin, 15:28:08: Stopping, pid is: Vim plugin, 15:28:08: Starting Server, command: "'/Users/twojcik/playground/script/rails' server" Vim plugin, 15:28:08: Executing command: rdebug-vim --file /Users/twojcik/.vim/bundle/vim-ruby-debugger/tmp/ruby_debugger --output /Users/twojcik/.vim/bundle/vim-ruby-debugger/tmp/ruby_debugger_output --socket /var/folders/ky/bzrkq4v1661c7wpbvjxj7h4w0000gn/T/vkenQjL/6 --logger_file /Users/twojcik/.vim/bundle/vim-ruby-debugger/tmp/ruby_debugger_log --debug_mode 1 --vim_executable mvim --vim_servername --separator ++vim-ruby-debugger-separator++ -- '/Users/twojcik/playground/script/rails' server Vim plugin, 15:28:09: PID: Vim plugin, 15:28:09: Waiting for starting debugger...

tomaszwojcik avatar Aug 13 '13 13:08 tomaszwojcik

Weird. Try to run this command from your logs just from console:

rdebug-vim --file /Users/twojcik/.vim/bundle/vim-ruby-debugger/tmp/ruby_debugger --output /Users/twojcik/.vim/bundle/vim-ruby-debugger/tmp/ruby_debugger_output --socket /var/folders/ky/bzrkq4v1661c7wpbvjxj7h4w0000gn/T/vkenQjL/6 --logger_file /Users/twojcik/.vim/bundle/vim-ruby-debugger/tmp/ruby_debugger_log --debug_mode 1 --vim_executable mvim --vim_servername --separator ++vim-ruby-debugger-separator++ -- '/Users/twojcik/playground/script/rails' server

astashov avatar Aug 13 '13 16:08 astashov

I got no output at all in the console. Maybe it's something with a hanging debugger (it keeps waiting at the end of log)?

tomaszwojcik avatar Aug 13 '13 16:08 tomaszwojcik

Hmm, you should get the PID after executing this command... And you use Rails >= 3.0, right?

astashov avatar Aug 13 '13 16:08 astashov

Yes, I have tested following scenarios, both for ruby 1.9.3 and 2.0 and rails 4.0:

  1. Open vim in dir with file.rb (then do :Rdebugger)
  2. Open vim in rails app dir (and run :Rdebugger)

Both scenarios give me no pid. I launch vim using mvim -v command in the console.

tomaszwojcik avatar Aug 13 '13 17:08 tomaszwojcik

Hmm, and if you just run script/rails server from console, it starts the server correctly?

astashov avatar Aug 13 '13 17:08 astashov

Yes, no problems at all. I also double checked my .vimrc and installation instructions.

tomaszwojcik avatar Aug 13 '13 17:08 tomaszwojcik

That sucks. :( The only thing I could recommend to do - debug rdebug-vim, which is part of 'debugger-xml' gem, and figure out why the PID is not printed as it should (here - https://github.com/astashov/debugger-xml/blob/master/lib/debugger/xml/extensions/vim_server.rb#L42) The problem is somewhere there, not inside vim-ruby-debugger itself.

astashov avatar Aug 13 '13 17:08 astashov

Aww :( I will try to debug that gem (and report if succeed). Thanks for help!

tomaszwojcik avatar Aug 13 '13 17:08 tomaszwojcik

No problem. :) Feel free to create the Pull Request there, if you find the source of the issue.

astashov avatar Aug 13 '13 17:08 astashov