Doesn't listen for Connection... PHP Xdebug Vagrant
See original GitHub issueI have a LAMP stack setup on a vagrant machine that I want to debug using vdebug. I’ve setup xdebug and its working fine with other IDEs ( vscode, intellij ).
The debugger doesn’t really seem to even attempt to connect or listen for a connection. As soon as I press F5 to start the debugger, I get the following ( all at once, no 20 second timeout ):
Waiting for a connection (Ctrl-C to cancel, this message will self-destruct in 20 seconds…) Connection to the debugger has been closed Press ENTER or type command to continue
I’m willing to bet its my setup for VIM. I’ve tried outputting Vdebug log but nothing was generated when I ran the commands in the README. Any help is appreciated!
Here is :version output…
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 11 2017 08:58:57) MacOS X (unix) version Included patches: 1-1175 Compiled by Homebrew Huge version with MacVim GUI. Features included (+) or not (-): +acl +cindent +cryptv -ebcdic +float +insert_expand +lispindent +mouseshape +mouse_xterm +path_extra +quickfix +statusline +terminal +user_commands +wildmenu -xterm_clipboard +arabic +clientserver +cscope +emacs_tags +folding +job +listcmds +mouse_dec +multi_byte +perl +reltime -sun_workshop +terminfo +vertsplit +windows -xterm_save +autocmd +clipboard +cursorbind +eval -footer +jumplist +localmap -mouse_gpm +multi_lang +persistent_undo +rightleft +syntax +termresponse +virtualedit +writebackup +balloon_eval +cmdline_compl +cursorshape +ex_extra +fork() +keymap +lua -mouse_jsbterm -mzscheme +postscript +ruby +tag_binary +textobjects +visual -X11 +browse +cmdline_hist +dialog_con_gui +extra_search +fullscreen +lambda +menu +mouse_netterm +netbeans_intg +printer +scrollbind +tag_old_static +timers +visualextra -xfontset ++builtin_terms +cmdline_info +diff +farsi -gettext +langmap +mksession +mouse_sgr +num64 +profile +signs -tag_any_white +title +viminfo +xim +byte_offset +comments +digraphs +file_in_path -hangul_input +libcall +modify_fname -mouse_sysmouse +odbeditor +python +smartindent +tcl +toolbar +vreplace -xpm +channel +conceal +dnd +find_in_path +iconv +linebreak +mouse +mouse_urxvt +packages -python3 +startuptime +termguicolors +transparency +wildignore -xsmp system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" defaults file: "$VIMRUNTIME/defaults.vim" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -F/usr/local/opt/python/Frameworks -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python /2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: clang -L. -L/usr/local/lib -L. -L/usr/local/lib -F/usr/local/opt/python/Frameworks -L/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -framework CoreFoundation -L/usr/local/lib -o Vim -framework Cocoa -framework Ca rbon -lm -lncurses -liconv -framework Cocoa -L/usr/local/opt/lua/lib -llua -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -F/usr/local/opt/python/Frameworks -framework Python -F/System/Library/Frameworks -framework Tcl -fram ework CoreFoundation -framework Ruby
Xdebug:
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_host = 10.0.2.2
xdebug.remote_connect_back = 1
xdebug.remote_port = 9000
xdebug.max_nesting_level = 512
VIM config:
let g:vdebug_options = { 'path_maps': { '/home/vagrant/sites': '/Users/ethan/sites'}, 'server': '192.168.10.10' }
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)

Top Related StackOverflow Question
Closing this since it looks like the issue is resolved
Of course! the second I ask, I understand the problem a little better. Put more debugging information into the plugin and found that the problem was configuring Homestead to forward the port, thus occupying the port on my host machine.