G
G
gto61202016-10-24 19:58:42
xdebug
gto6120, 2016-10-24 19:58:42

How to set up PHPSTORM with xdebug behind NAT?

Good afternoon. Host - win7, guest - centos7 on virtualbox behind NAT (Natnetwork). Set up forwarding from host port 9002 to guest port 9002. xdebug is configured like this:

xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_connect_back = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9002
xdebug.idekey = "PHPSTORM"

PhpStorm has a debugger configured on port 9002. I work with a local copy of the project, which is located in the project folder on the host, I also place breakpoints there. It seems that the mapping is configured in such a way that the root of the local project corresponds to the root of the project on the virtual machine, but when you run the script with a breakpoint, PhpStorm first asks you to accept an incoming connection, and then reports the end of the session without stopping and offers to configure the mapping.
Actually, none of the answers found on the net solved my problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gto6120, 2016-11-11
@gto6120

I did not find a configuration way in which the session would not be terminated immediately (although I used this approach earlier and everything worked). As a result, I downloaded the browser extension and started the session with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question