A
A
Alex Pts2013-10-30 15:41:48
PHP
Alex Pts, 2013-10-30 15:41:48

Remote debugging with xDebug.remote_autostart

There is a web server under virtualBox. Php 5.5, xDebug

xDebug config
xdebug.remote_enable=On
xdebug.remote_host=10.0.2.2
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
;xdebug.remote_autostart=On


The IDE is on the host and, through the forwarded port, accesses the nginx server in virtualBox, which in turn proxies the request to php-fpm, which processes the script.
Everything works fine as long as the xdebug.remote_autostart option is disabled. When this option is enabled, all requests are executed for 60 seconds and the server returns an error. If you enable debugging in the IDE (it is not necessary to set a breakpoint), then the requests go through again.


On windows, when there was a web server, if debugging in the IDE was turned off or the IDE was closed, then the request worked, and did not “hang”.

What prompt, in what party to dig?
It is necessary that with xDebug.remote_autostart if debugging or IDE is turned off, then requests pass as if this option is turned off.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
V
Vyacheslav Plisko, 2013-10-30
@AmdY

For a dev machine on a virtual machine, it's better to use
xdebug.remote_connect_back=1
and see if XDEBUG_SESSION is forwarded

A
Alex Pts, 2013-10-31
@AlexPTS

xdebug.remote_connect_back allows you to debug from any remote, I tried this option instead of remote_host, the result is the same.
xDebug.remote_autostart just allows you to debug requests without XDEBUG_SESSION. XDEBUG_SESSION runs fine with remote_autostart disabled.

K
karser, 2013-11-02
@karser

Use port forwarding via ssh

A
Anatoly, 2013-11-03
@taliban

I have the same problem, I've been suffering for several months now, I just can't find a solution =) I'll follow the topic, maybe something will appear

V
Vyacheslav Plisko, 2013-11-03
@AmdY

There may also be an option with not configured raw mapping in the IDE, in case of phpstrom.

T
tnz, 2014-02-26
@tnz

Host tcp/ip stack timeout. The author writes that it is fixed in the next. release.
bugs.xdebug.org/view.php?id=963
Here are the details and how to patch it if it's urgent
derickrethans.nl/advent15.html
Probably you can also try debugging a proxy, somewhere it was written in python, and then tweak the connection timeout manually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question