gotcha / vimpdb

Pdb and Vim integration
MIT License
201 stars 22 forks source link

Using "vim_server_script = vim" doesn't work correctly #7

Open pietrushnic opened 13 years ago

pietrushnic commented 13 years ago

I try to use vimpdb on remote system through ssh connection . My ~/.vimpdbrc: [vimpdb] vim_client_script = vim vim_server_script = vim server_name = VIM port = 6666

I set breakpoint in one of my project files and run project main file, when execution hit breakpoint new vim was launched but there is no code to debugging only vim welcome screen. When I try to quit vim using :q after short delay I got this python trace (I changed paths):

Runtime Exception caugth 'VIM' server name not available in server list:

Traceback (most recent call last): File "src/main.py", line 62, in exitStatus = app.RunApp(sys.argv) File "/path/to/my/project/src/application.py", line 308, in RunApp import vimpdb; vimpdb.set_trace() File "/path/to/home/dir/lib/python2.7/site-packages/vimpdb-0.4.5-py2.7.egg/vimpdb/debugger.py", line 213, in set_trace instance = make_instance() File "/path/to/home/dir/lib/python2.7/site-packages/vimpdb-0.4.5-py2.7.egg/vimpdb/debugger.py", line 201, in make_instance configuration = config.getConfiguration() File "/path/to/home/dir/lib/python2.7/site-packages/vimpdb-0.4.5-py2.7.egg/vimpdb/config.py", line 105, in getConfiguration Detector(config).check_serverlist() File "/path/to/home/dir/lib/python2.7/site-packages/vimpdb-0.4.5-py2.7.egg/vimpdb/config.py", line 285, in check_serverlist raise ValueError(msg % (self.server_name, serverlist)) ValueError: 'VIM' server name not available in server list:

Looks like server didn't start correctly. Is it possible to use vim editor (not gvim) as client and server with vimpdb module ? My vimpdb module was installed in my $HOME directory /path/to/home/dir.

awsong commented 11 years ago

Got the same issue. Did you resolve this problem?

lemonzi commented 8 years ago

Same here. After manually opening a vim server named VIM, I got the same as in #14.

jontrainor commented 7 years ago

l had something similar to this. vimpdb was spinning up a vim server named VIM1 even when I specified the server should be called VIM in the vimpdbrc file. I worked around that quirk by just specifying a unique server name in the vimpdbrc like this and it fixed this issue for me.

 [vimpdb]
 vim_client_script = mvim
 vim_server_script = mvim --servername VIMPDB-SERVER
 server_name = VIMPDB-SERVER
 port = 6666
gotcha commented 7 years ago

@jontrainor Would you mind adding some documentation ?

jontrainor commented 7 years ago

I would be happy to but I think this might be a very specific case. I actually have no idea what is stealing the default "VIM" server name on my machine. What I could do is change the defaults to specify a unique server name like "VIMPDB-SERVER" to avoid this issue all together. What do you think about that?