vim-vdebug / vdebug

Multi-language DBGP debugger client for Vim (PHP, Python, Perl, Ruby, etc.)
MIT License
1.3k stars 156 forks source link

Vdebug fails to launch debugger buffers for PHP #333

Open kepford opened 6 years ago

kepford commented 6 years ago

328 was closed but is not fixed.

The issue remains for me even after updating to commit 4b5616b.

The connection is made and script execution of the PHP stops but the buffers are not loaded and then the connection is dropped by Vdebug.

Debugging output.

- [Debug] {Tue 13 2018 15:58:49} ** ReloadKeymappingsEvent
- [Debug] {Tue 13 2018 15:58:59} ** SetBreakpointEvent
- [Debug] {Tue 13 2018 15:58:59} Replacing local path
  (/Users/kepford/Sites/client/vagrant/client) with remote path
  (/home/vagrant/client)
- [Info] {Tue 13 2018 15:58:59} Adding line breakpoint, id 11000
- [Debug] {Tue 13 2018 15:59:09} Started
- [Debug] {Tue 13 2018 15:59:09} Listening on port 9000
- [Debug] {Tue 13 2018 15:59:13} Found client, ('127.0.0.1', 49909)
- [Debug] {Tue 13 2018 15:59:13} Finishing socket server
- [Debug] {Tue 13 2018 15:59:14} Setting buffer for DebuggerStack: []
- [Debug] {Tue 13 2018 15:59:14} Setting buffer for DebuggerStatus: []
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'inoremap <expr> <Up> pumvisible() ? "\" : "\<Up>"
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'inoremap <expr> <Down> pumvisible() ? "\" : "\<Down>"
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'nnoremap <Down> :resize -1
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'nnoremap <Up> :resize +1
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'nnoremap <Right> :vertical resize -1
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'nnoremap <Left> :vertical resize +1
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'vnoremap <Right> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'onoremap <Right> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'vnoremap <Left> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'onoremap <Left> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'vnoremap <Down> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'onoremap <Down> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'vnoremap <Up> <Nop>
'
- [Debug] {Tue 13 2018 15:59:15} Storing existing key mapping, 'onoremap <Up> <Nop>
'
- [Info] {Tue 13 2018 15:59:15} Closing the connection
- [Debug] {Tue 13 2018 15:59:15} Command: stop -i 1
- [Debug] {Tue 13 2018 15:59:15} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="1" status="stopped" reason="ok"></response>
- [Debug] {Tue 13 2018 15:59:15} Closing the socket
- [Debug] {Tue 13 2018 15:59:15} Closing the socket
- [Debug] {Tue 13 2018 15:59:15} Creating hidden buffer: ['']
- [Debug] {Tue 13 2018 15:59:15} Creating hidden buffer: ['']
- [Debug] {Tue 13 2018 15:59:15} Creating hidden buffer: ['Status: stopped', 'Listening on port', 'Not connected', '', 'Press <Leader>/ to start debugging, q to stop/close. Type :help Vdebug for more information.']
- [Debug] {Tue 13 2018 15:59:15} Creating hidden buffer: [' 11000   | line
  | /Users/kepford/Sites/client/vagrant/client/docroot/index.php:17']
- [Debug] {Tue 13 2018 15:59:15} Creating hidden buffer: []
- [Debug] {Tue 13 2018 15:59:15} Creating hidden buffer: []
- [Debug] {Tue 13 2018 15:59:15} Closing the socket
winged commented 6 years ago

+1, I have the same issue (Linux terminal, Neovim). Similar log output overall (except the "Storing existing key mapping" ones).

dajnz commented 6 years ago

+1, me too: Ubuntu 16.04, Neovim:

Vdebug log:

- [Debug] {Tue 27 2018 05:08:59} Setting buffer for DebuggerWatch: []
- [Debug] {Tue 27 2018 05:08:59} Setting buffer for DebuggerStack: []
- [Debug] {Tue 27 2018 05:08:59} Setting buffer for DebuggerStatus: []
- [Info] {Tue 27 2018 05:08:59} Closing the connection
- [Debug] {Tue 27 2018 05:08:59} Command: detach -i 1
- [Debug] {Tue 27 2018 05:08:59} Response: <?xml version="1.0" encoding="iso-8859-1"?>
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="detach" transaction_id="1" status="stopped" reason="ok"></response>
- [Debug] {Tue 27 2018 05:08:59} Closing the socket
- [Debug] {Tue 27 2018 05:08:59} Closing the socket
- [Debug] {Tue 27 2018 05:08:59} Closing the socket
- [Debug] {Tue 27 2018 05:08:59} Creating hidden buffer: ['']
- [Debug] {Tue 27 2018 05:08:59} Creating hidden buffer: ['']
- [Debug] {Tue 27 2018 05:08:59} Creating hidden buffer: []
- [Debug] {Tue 27 2018 05:08:59} Creating hidden buffer: []
- [Debug] {Tue 27 2018 05:08:59} Creating hidden buffer: []
- [Debug] {Tue 27 2018 05:08:59} Creating hidden buffer: ['']
- [Debug] {Tue 27 2018 05:08:59} Closing the socket

Xdebug log:

Log opened at 2018-03-27 02:15:03
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 172.17.0.1:9009.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///app/public/index.php" language="PHP" xdebug:language_version="7.2.2-1+ubuntu16.04.1+deb.sury.org+1" protocol_version="1.0" appid="1199" idekey="PHPSTORM"><engine version="2.6.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>

<- detach -i 1
Log closed at 2018-03-27 02:15:03

configs:

-------- Vdebug ---------
let g:vdebug_options= {
\    "port" : 9009,
\    "timeout" : 20,
\    "on_close" : "detach",
\    "break_on_open" : 0,
\    "ide_key" : "PHPSTORM",
\    "path_maps" : {},
\    "server" : "",
\    "debug_window_level" : 0,
\    "debug_file_level" : 8,
\    "debug_file" : "~/vdebug.log",
\    "continuous_mode" : 1,
\    "watch_window_style" : "expanded",
\    "marker_default" : "⬦",
\    "marker_closed_tree" : "▸",
\    "marker_open_tree" : "▾"
\}

-------- Xdebug --------
[xdebug]
zend_extension=/usr/lib/php/20170718/xdebug.so
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.idekey=PHPSTORM
xdebug.remote_port=9009
xdebug.remote_connect_back=1
xdebug.remote_autostart=1
xdebug.remote_log=/var/log/xdebug.log
gvanbeck commented 6 years ago

+1