vdebug: cannot connect to xdebug - `Connection to the debugger has been closed`
I’m trying to connect to xdebug on a remote VM, but it just fails instantly with “Connection to the debugger has been closed”. I created github repo with a Vagrant VM which reproduces this issue. Once up and running, the VM is reachable at 33.33.33.10 and has xdebug loaded (it appears in phpinfo output ). I have also checked that xdebug.ini is parsed.
Logging doesn’t help much:
- [Info] {Fri 19 2013 11:59:14} Connection to the debugger has been closed
Looking through the source code, it seems this message is shown when a socket is closed, but I don’t know where to go from here.
vdebug settings:
g:vdebug_options
{'debug_file': 'vdebug_log',
'debug_file_level': 2,
'watch_window_style': 'expanded',
'marker_default': '*',
'continuous_mode': 0,
'ide_key': '',
'break_on_open': 1,
'on_close': 'detach',
'path_maps': {'/var/www': 'C:\code\xdebug-test'},
'marker_closed_tree': '+',
'timeout': 20,
'port': 9000,
'marker_open_tree': '-',
'debug_window_level': 1,
'server': '33.33.33.10'}
Also, here’s some output from Apache’s access.log:
33.33.33.1 - - [19/Apr/2013:12:26:11 +0100] "GET /debug_me.php HTTP/1.1" 200 314 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 41
@Iazel you’re a lifesaver. My understanding of
remote_portwas the same as yours before. That totally makes sense now!