@@ -410,11 +410,12 @@ the message: >
410410(If you don't get this message see the section on troubleshooting,
411411|VdebugTroubleshooting|)
412412
413- Vdebug is now listening for an incoming connection, which will be started when
414- a script is run with the debugger engine activated. View the section
415- |VdebugSetUp| to see the necessary steps to start a script in this way. It will
416- be obvious when a connection is made, because a new VIM tab opens with four
417- windows, signalling the start of a new debugging session.
413+ Vdebug is now listening for an incoming connection (on all available interfaces
414+ by default), which will be started when a script is run with the debugger
415+ engine activated. View the section |VdebugSetUp| to see the necessary steps to
416+ start a script in this way. It will be obvious when a connection is made,
417+ because a new VIM tab opens with four windows, signalling the start of a new
418+ debugging session.
418419
419420If you are starting a script but Vdebug does not react, see the
420421|VdebugTroubleshooting| section for information.
@@ -502,11 +503,13 @@ debugger's status, which is a message the engine sends to Vdebug. It will say
502503when it's starting, running, breaking or stopping.
503504
504505The two lines below show the connection details. The first of these lines show
505- which address and port Vdebug is binding itself to (defaults to localhost:9000)
506- and the second shows the address and port that the engine has used to connect.
507- If you're debugging a script on your machine then the IP address will be the
508- same as localhost. It's only when you're debugging a script on a remote server
509- that it will be any different. However, the port used will be, to all intents
506+ which address and port Vdebug is binding itself to (defaults to port 9000 on
507+ all available interfaces) and the second shows the address and port that the
508+ engine has used to connect.
509+
510+ If you're debugging a script on your machine then the IP address will probably
511+ be shown as 127.0.0.1. When you're debugging a script on a remote server then
512+ it will be an external IP. However, the port displayed will be, to all intents
510513and purposes, random.
511514
512515The bottom line is just a helpful message, reminding you how to start and where
@@ -822,7 +825,7 @@ retain option settings by adding them to your vimrc.
822825The default options look like this: >
823826 let g:vdebug_options= {
824827 \ "port" : 9000,
825- \ "server" : 'localhost ',
828+ \ "server" : '',
826829 \ "timeout" : 20,
827830 \ "on_close" : 'detach',
828831 \ "break_on_open" : 1,
@@ -853,11 +856,13 @@ g:vdebug_options["port"] (default = 9000)
853856 you also change the port that the engine uses.
854857
855858 *VdebugOptions-server*
856- g:vdebug_options["server"] (default = "localhost")
857- Sets the address that Vdebug will use to listen for connections. It
858- defaults to localhost, as it assumes that the debugger engine will be
859- running on the same machine and also connecting to localhost. If you want
860- to debug a script on a different machine, look at |VdebugRemote|.
859+ g:vdebug_options["server"] (default = "")
860+ Sets the IP address or host name that Vdebug will use to listen for
861+ connections. It defaults to a blank string, which corresponds to all
862+ available interfaces. You can set this explicitly if you want to restrict
863+ which address Vdebug will bind to, if that's a requirement. However,
864+ allowing all interfaces by default takes one step out of the process of
865+ debugging remote scripts (see |VdebugRemote|).
861866
862867 *VdebugOptions-timeout*
863868g:vdebug_options["timeout"] (default = 20)
@@ -1069,21 +1074,24 @@ This part depends a lot upon your network set-up and firewall rules. But here's
10691074the basic information:
10701075
10711076 * You need to bind Vdebug to an address that's visible to the remote
1072- machine (i.e. not "localhost")
1077+ machine (i.e. not "localhost") - it will do this automatically unless
1078+ you've explicitly set the "server" option
10731079 * You must have port 9000 allowed by any firewall you might have on your
10741080 machine or router
10751081
10761082I'll give an example of my own here. I had two machines on an internal network,
10771083one was my desktop (192.168.1.1) and the other was a server (192.168.1.2) running
10781084the script that I wanted to debug on my desktop. I configured Xdebug on the
1079- server to use my desktop's IP address as the remote host. I then set the Vdebug
1080- server address to be "192.168.1.1" (NOT "localhost") in the options : >
1085+ server to use my desktop's IP address as the remote host. The default "server"
1086+ option in Vdebug is blank, which allows it to bind to all interfaces : >
10811087
1082- let g:vdebug_options['server'] = "192.168.1.1 "
1088+ let g:vdebug_options['server'] = ""
10831089<
1084- I also had to set an Xdebug option "remote_connect_back=on" in the INI file on
1085- the server. This combination of things allowed me to accept remote connections
1086- on my desktop.
1090+ You can either leave this blank, or set the IP address explicitly.
1091+
1092+ I also had to set an Xdebug option "remote_connect_back=on" in the Xdebug INI
1093+ file on the server. This combination of things allowed me to accept remote
1094+ connections on my desktop.
10871095
10881096The two machines don't have to be on an internal network, but if they aren't
10891097then I can all but guarantee that you will have to route port 9000 to your
@@ -1113,8 +1121,11 @@ it to this list.
11131121 activate the engine when running the script (e.g. setting environment
11141122 variables/URL variables). If the problem persists, check that the
11151123 debugger engine is connecting the same port and address that Vdebug is
1116- binding to (the 'port' and 'server' options). Also check that the IDE
1117- key option is empty.
1124+ binding to (the 'port' and 'server' options). The server option is blank
1125+ by default, which means that it will connect to all available interfaces.
1126+ Unless you've changed this option, it's unlikely to be the issue. Also
1127+ check that the IDE key option is empty, as this will turn off IDE key
1128+ matching.
11181129
11191130 Q. I can't debug a script on a remote machine, what's going on?
11201131 A. Have you read the section on remote debugging, |VdebugRemote|? I mean,
0 commit comments