Dinly
Dinly

Reputation: 171

PhpStorm - Remote debugging with xDebug

OK, first things first. I started working on a new PHP project which, as in many cases, to put it mildly, built terribly. It is not possible, at this point, to copy the project to a local machine so I forced to work via FTP.

I would like to set up remote debugging, so the code will run remotely but I will be able to debug it locally.

The server is Amazon Linux, Apache, PHP 5.3.29 with xDebug v2.2.3.

php.ini:

zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

I am trying to make in happen, according to many tutorials from the web, but it seems I am doing something wrong.

Somebody knows a working step-by-step configuration so I can set this up and forget?

Upvotes: 1

Views: 544

Answers (1)

devnull
devnull

Reputation: 608

If you want your IDE to connect to xDebug you need to set the remote host to the IP where your IDE runs.

Other option would be xdebug.remote_connect_back=1

see: https://xdebug.org/docs/all_settings

Upvotes: 1

Related Questions