Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vim don't respond when start debugging #481

Closed
Abyweinberg opened this issue Aug 31, 2020 · 8 comments
Closed

Vim don't respond when start debugging #481

Abyweinberg opened this issue Aug 31, 2020 · 8 comments

Comments

@Abyweinberg
Copy link

Abyweinberg commented Aug 31, 2020

Hi,
First at all, Thank you for your hard work.
This is my first time with this plug and I'm very new user with vim, so can be a bad configuration my problem.
I do this steps:

1- Add the log file as describe in the vdebug help:

:VdebugOpt debug_file ~/vdebug.log
:VdebugOpt debug_file_level 2

2- Press F5 in vim and get "Vdebug will wait for a connection in the background" instead of "Waiting for a connection (this message will self-destruct in 30 seconds...)"

3- Refresh the browser "F5" -> http://localhost:9000/exercise_php.php

4- Nothing change so press again F5 in vim and get -> Found connection, starting debugger

5- Nothing happen -> Press some keys -> Vim stay like "lock"

6- Refresh browser and stop the script

7- vim start to perform every clicked keys.

vdebug.log:

1 - [Debug] {Mon 31 2020 16:58:30} Closing the socket
2 - [Debug] {Mon 31 2020 16:58:30} keymapper: unmap
3 - [Debug] {Mon 31 2020 17:00:09} Closing the socket
4 - [Debug] {Mon 31 2020 17:00:09} Closing the socket

vim --version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 15 2019 16:41:15)
Included patches: 1-875, 878, 884, 948, 1046, 1365-1368, 1382, 1401
Modified by [email protected]
Compiled by [email protected]
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    +tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
+balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
+browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +textprop
+byte_offset       -hangul_input      +num64             +timers
+channel           +iconv             +packages          +title
+cindent           +insert_expand     +path_extra        +toolbar
+clientserver      +job               +perl              +user_commands
+clipboard         +jumplist          +persistent_undo   +vartabs
+cmdline_compl     +keymap            +postscript        +vertsplit
+cmdline_hist      +lambda            +printer           +virtualedit
+cmdline_info      +langmap           +profile           +visual
+comments          +libcall           -python            +visualextra
+conceal           +linebreak         +python3           +viminfo
+cryptv            +lispindent        +quickfix          +vreplace
+cscope            +listcmds          +reltime           +wildignore
+cursorbind        +localmap          +rightleft         +wildmenu
+cursorshape       +lua               +ruby              +windows
+dialog_con_gui    +menu              +scrollbind        +writebackup
+diff              +mksession         +signs             +X11
+digraphs          +modify_fname      +smartindent       -xfontset
+dnd               +mouse             +startuptime       +xim
-ebcdic            +mouseshape        +statusline        +xpm
+emacs_tags        +mouse_dec         -sun_workshop      +xsmp_interact
+eval              +mouse_gpm         +syntax            +xterm_clipboard
+ex_extra          -mouse_jsbterm     +tag_binary        -xterm_save
   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: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-4Pursk/vim-8.1.0875=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu -lpython3.7m -lcrypt -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm  

php7.3 --version

PHP 7.3.19-1~deb10u1 (cli) (built: Jul  5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.0RC2, Copyright (c) 2002-2019, by Derick Rethans

Thank you very much!

@lucc
Copy link
Contributor

lucc commented Aug 31, 2020

Did you set a breakpoint in vim (:Breakpoint) or did you configure php-xdebug to automatically break at the beginning of the script?

@Abyweinberg
Copy link
Author

@lucc Hey, for any reason my response disappear or didn't saved here.
Yes I did :Breakpoint.

Sorry for the delay.

@BlackIkeEagle
Copy link
Member

@Abyweinberg vdebug can't use port 9000 if you have fpm on 9000.

Could you try to configure xdebug to use 9001 and also set this in the vdebug configuration 9001 is used ?

xdebug ini setting:

xdebug.remote_port = 9001

somewhere in your vimrc if you don't yet have any vdebug settings

let g:vdebug_options = {
    \'port': 9001
\}

@BlackIkeEagle
Copy link
Member

@Abyweinberg do you still have the issue or is it resolved?

@Abyweinberg
Copy link
Author

Hi, @BlackIkeEagle thanks for ask, right now I saw your comment (trying with other port).
I move to vscode for the moment because the pressure of the task (php task "actually a work interview") and now I'am developing in Python.
Please let me check your solution in the next few days (actually I hope to check it tonight UTM +2) I'll be very glad to help.
BTW Hope you understand my not native English.

@Abyweinberg
Copy link
Author

Hi @BlackIkeEagle,
So I tried using the port 9001 and get a connection but when I press f2 to the next line after a couple of second I got this message:
Error starting Vdebug: <class 'socket.timeout'>

This is the log file

1 - [Debug] {Tue 13 2020 18:13:16} keymapper: unmap
2 - [Debug] {Tue 13 2020 18:13:16} Closing the socket
3 - [Debug] {Tue 13 2020 18:13:16} Closing the socket

I also got this:
Screenshot from 2020-10-13 18-01-05

@meldafert
Copy link
Contributor

@Abyweinberg The last issue is the same as #484 - this should be fixed in the latest version.

@Abyweinberg
Copy link
Author

Thank you for your help.
Have a grate day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants