astashov / vim-ruby-debugger

Vim plugin for debugging Ruby applications (using ruby-debug-ide gem)
435 stars 36 forks source link

Not hit breakpoint on Linux #85

Closed liuxuan30 closed 11 years ago

liuxuan30 commented 11 years ago

Hi I'm new to this plugin and VIM, and I follow the guide, but it can't hit the break point. and the variable window is empty. I have checked the issues, but not work for me.

What I do is that first SSH to my Linux VM, then launch vim:

[ssh-bash]vim --servername VIM then type :edit test.rb then set the break point, and I could see 'xx' tag then launch variable window v then type :Rdebugger test.rb

but nothing happens in VIM

Here's the information

ENV: Linux VM Ubuntu 12.04 VIM 7.3 * LOCAL GEMS * bundler (1.3.4) columnize (0.3.6) linecache (0.46) log4r (1.1.10) net-scp (1.1.0) net-ssh (2.6.6) rake (10.0.4) rbx-require-relative (0.0.9) ruby-debug (0.10.4) ruby-debug-base (0.10.4) ruby-debug-ide (0.4.16) rubygems-bundler (1.1.1) rvm (1.11.3.6)

LOG


cat ruby_debugger_log


Vim plugin, 18:06:53: Executing :Rdebugger... Vim plugin, 18:06:53: Initializing Server object, with variables: hostname: 127.0.0.1, rdebug_port: 39767, debugger_port: 39768, runtime_dir: /auto/home2/liux14/.vim, tmp_file: /auto/home2/liux14/.vim/tmp/ruby_debugger, output_file: /auto/home2/liux14/.vim/tmp/ruby_debugger_output Vim plugin, 18:06:53: Starting Server, command: "'/auto/home2/liux14/test.rb' " Vim plugin, 18:06:53: Trying to kill all old servers first Vim plugin, 18:06:53: Trying to find PID of process on 39767 port, must_get_pid = 0 Vim plugin, 18:06:53: Trying to find listener of port 39767 Vim plugin, 18:06:53: Executing command: lsof -i tcp:39767 | grep LISTEN | awk '{print $2}' Vim plugin, 18:06:53: Found pid - 14396 Vim plugin, 18:06:53: PID - 14396, found by 0 repeats Vim plugin, 18:06:53: Killing server with pid 14396 Vim plugin, 18:06:53: Executing command: ruby -e 'Process.kill9,14396)' Vim plugin, 18:06:53: Sleeping 100m... Vim plugin, 18:06:53: Killed server with pid: 14396 Vim plugin, 18:06:53: Trying to find PID of process on 39768 port, must_get_pid = 0 Vim plugin, 18:06:53: Trying to find listener of port 39768 Vim plugin, 18:06:53: Executing command: lsof -i tcp:39768 | grep LISTEN | awk '{print $2}' Vim plugin, 18:06:53: Found pid - 14399 Vim plugin, 18:06:53: PID - 14399, found by 0 repeats Vim plugin, 18:06:53: Killing server with pid 14399 Vim plugin, 18:06:53: Executing command: ruby -e 'Process.kill9,14399)' Vim plugin, 18:06:53: Sleeping 100m... Vim plugin, 18:06:53: Killed server with pid: 14399 Vim plugin, 18:06:53: Servers are killed, trying to start new servers Vim plugin, 18:06:53: Executing command: rdebug-ide -p 39767 -- '/auto/home2/liux14/test.rb' > /auto/home2/liux14/.vim/tmp/ruby_debugger_output 2>&1 & Vim plugin, 18:06:53: Executing command: ruby /auto/home2/liux14/.vim/bin/ruby_debugger.rb 127.0.0.1 39767 39768 vim "/auto/home2/liux14/.vim/tmp/ruby_debugger" posix 1 /auto/home2/liux14/.vim/tmp/ruby_debugger_log & Vim plugin, 18:06:53: Now we need to store PIDs of servers, retrieving them: Vim plugin, 18:06:54: Trying to find PID of process on 39767 port, must_get_pid = 1 Vim plugin, 18:06:54: Trying to find listener of port 39767 Vim plugin, 18:06:54: Executing command: lsof -i tcp:39767 | grep LISTEN | awk '{print $2}' Vim plugin, 18:06:54: Found pid - Vim plugin, 18:06:54: Trying to find listener of port 39767 Vim plugin, 18:06:54: Executing command: lsof -i tcp:39767 | grep LISTEN | awk '{print $2}' Vim plugin, 18:06:54: Found pid - 14453 Vim plugin, 18:06:54: PID - 14453, found by 1 repeats Vim plugin, 18:06:54: Trying to find PID of process on 39768 port, must_get_pid = 1 Vim plugin, 18:06:54: Trying to find listener of port 39768 Vim plugin, 18:06:54: Executing command: lsof -i tcp:39768 | grep LISTEN | awk '{print $2}' Vim plugin, 18:06:54: Found pid - 14456 Vim plugin, 18:06:54: PID - 14456, found by 0 repeats Vim plugin, 18:06:54: Server PIDs are: rdebug-ide: 14453, ruby_debugger.rb: 14456 Vim plugin, 18:06:54: Debugger is successfully started Vim plugin, 18:06:54: Adding 'break /auto/home2/liux14/test.rb:4' to queue Vim plugin, 18:06:54: Adding 'start' to queue Vim plugin, 18:06:54: Executing queue Vim plugin, 18:06:54: Sending a message to ruby_debugger.rb: 'break /auto/home2/liux14/test.rb:4++vim-ruby-debugger separator++start' Vim plugin, 18:06:54: Using Vim built-in Ruby to send message


cat ruby_debugger_output


Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens on 127.0.0.1:39767


code:

test.rb
1 require "syck" 2 a=1 3 b=2 xx 4 c=a+b
5 c 6 puts "end of ruby script"