php - PhpStorm remote debug with xdebug -
i want debug phpstorm ide , xdebug site in server. locally works perfectly, when want configure debug server can't.
i installed xdebug in server, configuration:
xdebug.remote_enable=1 xdebug.remote_connect_back=1 xdebug.remote_handler=dbgp xdebug.remote_host=my ip xdebug.remote_port=9000 xdebug.idekey=phpstorm
then setup in phpstorm in "edit configurations" "php remote debug" , "server"
in server put:
name: xxxx port: 80 host: url of site debugger: xdebug checked "use path mapping" , in file/directory put local proyect path "/home/mysite" in "absolute path on server" put path in server proyect: "/var/www/html/mysite"
in "php remote debug" put:
name: xxxx servers: server created ide key: phpstorm
with these settings did not work. use chrome extension xdebug ide key phpstorm enable.
what lacking me work?
i think had same problem @ work once when freshly hatched. when xdebug running on server, port of xdebug engine of course open on local system (the remote server).
the best way port on development machine create safe ssh tunnel between these 2 systems. on local machine, in ssh-config-file (often located under ~/.ssh/config), following:
host example hostname 192.168.2.1 user johndoe localfoward 9200 127.0.0.1:9000
now when -on console-
ssh example
it connect remote system (192.168.2.1) username (login) johndoe , tunnel port 9200 on remote machine port 9000 on local machine. of course can use same port both.
i hope helps. :)
Comments
Post a Comment