Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Does not stop at breakpoints if used within terminal MacVim #66

Open
v-yarotsky opened this Issue · 6 comments

5 participants

@v-yarotsky

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

@astashov astashov was assigned
@astashov
Owner

Frankly, never tried to run it this way. Will try to take a look at that this weekend, thanks for reporting. :)

@jtmkrueger

So is this still an issue? Debating if I want to try and play with this awesome looking plugin.

@astashov
Owner

Umm, sorry, still didn't check/fix that issue. :(
You can try mvim for now, it works just fine. :)

@riannucci

hey @astashov , I think this is exactly the same issue I was running into earlier today.

@riannucci

I think this is an implementation issue in MacVim. From (http://vim.1045645.n5.nabble.com/Is-it-possible-to-start-MacVim-without-GUI-but-as-server-td4718233.html):

The client/server feature uses the GUI to provide server lists, and
you also need to start the GUI to become a server. A non-GUI Vim can
only be a client. See ":h macvim-clientserver".

It would certainly be possible to implement this differently, but
its not something I'm particularly interested in doing so this will
only happen if somebody else sends me a patch (it won't be trivial to
implement).

Björn

@mgomes1

As pointed above, the terminal MacVim cannot act like a server - for that you'll need the GUI MacVim.

However, you can install the standard Vim (not MacVim) and it will work if it's compiled with support to client/server feature. I tried here and it works nicely with vim-ruby-debugger in the terminal - the only annoying bit is it starts X11. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.