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

nvim freezes on xdebug connection, then Error starting Vdebug: <class 'EOFError'> in the statusline #500

Open
l00sed opened this issue Feb 3, 2021 · 0 comments

Comments

@l00sed
Copy link

l00sed commented Feb 3, 2021

I'm an Xdebug n00b, so excuse me if this is something dumb and I just don't know what I'm doing.
I believe my configs are setup correctly. I'm using nvim, but have Local by Flywheel for setting up my development environment. I could only find one other person on the Internet who's doing the same thing:
https://webdevstudios.com/2019/04/16/debugging-wordpress-with-local-by-flywheel-neovim-and-xdebug/
But I believe their tutorial is outdated.

Basically, I mark a breakpoint, start Vdebug. Then:
/tmp/xdebug.log

Started
Listening on port 9000

...nothing happens, until I go to localhost:9000; then:

Found client
Finishing socket server
Got connection, starting
create session
keymapper: reload_keys
start session

At this point, nvim is locked up. I can't move the cursor up or down, can't run any vim commands.
localhost:9000 is still spinning at this point and hasn't loaded anything. When I stop the page, nvim frees up again.
However, it spits out Error starting Vdebug: <class 'EOFError'> in the statusline.
The Vdebug buffers have never opened at any point along the way.

~/.vimrc

" Vdebug
let g:vdebug_options = {
\   "port"                : "9000",
\   "server"              : "127.0.0.1",
\   "timeout"             : 20,
\   "on_close"            : "detach",
\   "break_on_open"       : 0,
\   "ide_key"             : "vdebug",
\   "debug_window_level"  : 0,
\   "debug_file_level"    : 2,
\   "path_maps"           : { "/app/public/": "/home/dan/Local Sites/surgicorps/app/public/" },
\   "debug_file"          : "/tmp/xdebug.log",
\   "watch_window_style"  : "compact",
\   "layout"              : "horizontal",
\   "marker_default"      : "⬦",
\   "marker_closed_tree"  : "▸",
\   "marker_open_tree"    : "▾"
\}

php.ini

[xdebug]
{{#if os.windows}}
zend_extension = php_xdebug.dll
{{else}}
zend_extension = {{extensionsDir}}/xdebug.so
{{/if}}

xdebug.remote_enable=1
xdebug.remote_connect_back=On
xdebug.remote_handler=dbgp
xdebug.remote_port="9000"
xdebug.remote_host="127.0.0.1"
xdebug.idekey="vdebug"
xdebug.profiler_enable=1
xdebug.remote_autostart=1
xdebug.show_error_trace=On

nvim

NVIM v0.4.4
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-aKIhK1/neovim-0.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-aKIhK1/neovim-0.4.4/build/config -I/build/neovim-aKIhK1/neovim-0.4.4/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-aKIhK1/neovim-0.4.4/build/src/nvim/auto -I/build/neovim-aKIhK1/neovim-0.4.4/build/include
Compiled by team+vim@tracker.debian.org

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

nvim :checkhealth

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0ms
  - INFO: $TERM: tmux-256color

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: xclip

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Multiple python2 executables found.  Set `g:python_host_prog` to avoid surprises.
  - INFO: Executable: /usr/bin/python2
  - INFO: Other python executable: /bin/python2
  - INFO: Python version: 2.7.18
  - INFO: pynvim version: 0.4.2
  - OK: Latest pynvim is installed.

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Multiple python3 executables found.  Set `g:python3_host_prog` to avoid surprises.
  - INFO: Executable: /usr/bin/python3
  - INFO: Other python executable: /bin/python3
  - INFO: Python version: 3.8.5
  - INFO: pynvim version: 0.4.2
  - OK: Latest pynvim is installed.

php_info() | PHP -v 7.4.3
image

@l00sed l00sed closed this as completed Feb 4, 2021
@l00sed l00sed reopened this Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant