astashov/vim-ruby-debugger — Issue #66: Does not stop at breakpoints if used within terminal MacVim
Author: v-yarotsky
Created: 2012-02-01 22:44:07+00:00
State: open

In .vimrc I have:

```
let g:ruby_debugger_progname = 'mvim'
let g:ruby_debugger_debug_mode=1
```

I launch debugger like this:

```
:Rdebugger 'script/rails server'
```

Server and debugger starts successfully. Then I set a breakpoint, and the following output appears in ruby_debugger_log:

Vim plugin, 01:26:07: Trying to toggle a breakpoint in the file /users/user/Projects/sample/app/controllers/dashboard_controller.rb:11
Vim plugin, 01:26:07: There is no already set breakpoint, so create new one
Vim plugin, 01:26:07: Set breakpoint to: /users/user/Projects/sample/app/controllers/dashboard_controller.rb:11
Vim plugin, 01:26:07: Added Breakpoint object to RubyDebugger.breakpoints array
Vim plugin, 01:26:07: Trying to find PID of process on 39767 port, must_get_pid = 0
Vim plugin, 01:26:07: Trying to find listener of port 39767
Vim plugin, 01:26:07: Executing command: lsof -i tcp:39767 | grep LISTEN | awk '{print $2}'
Vim plugin, 01:26:07: Found pid - 67671
Vim plugin, 01:26:07: PID - 67671, found by 0 repeats
Vim plugin, 01:26:07: Trying to find PID of process on 39768 port, must_get_pid = 0
Vim plugin, 01:26:07: Trying to find listener of port 39768
Vim plugin, 01:26:07: Executing command: lsof -i tcp:39768 | grep LISTEN | awk '{print $2}'
Vim plugin, 01:26:07: Found pid - 67673
Vim plugin, 01:26:07: PID - 67673, found by 0 repeats
Vim plugin, 01:26:07: Server is running, so add command to Queue
Vim plugin, 01:26:07: Adding 'break /users/user/Projects/sample/app/controllers/dashboard_controller.rb:11' to queue
Vim plugin, 01:26:07: Executing queue
Vim plugin, 01:26:07: Sending a message to ruby_debugger.rb: 'break /users/user/Projects/sample/app/controllers/dashboard_controller.rb:11'
Vim plugin, 01:26:07: Using Vim built-in Ruby to send message

so it seems to be ok.
But breakpoint is never hit when when I run vim like this:

```
vim --servername VIM
```

here vim is the alias to mvim (but runs in terminal, not gui version).
I've tried to set `g:ruby_debugger_progname` to `vim`, `mvim`, `Vim`, but it didn't work.
Though it appears to work within gui version of macvim.

BTW I use ree-1.8.7-2011.03 via RVM, Rails 3.0.5, ruby-debug 0.10.4, ruby-debug-base 0.10.4, ruby-debug-ide 0.4.16