PhpStorm remote debugging using xdebug

I want to debug my site on server using PHPstorm IDE and xdebug. It works fine locally, but when I want to configure debugging from the server, I cannot.

I installed xdebug on a server with this 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 I install in PHPSTORM in "Editing configurations" "Remote PHP debugger" and "Server"

On the server I will put:

Name: xxxx
Port: 80
Host: Url of my site
Debugger: Xdebug
I checked "Use Path Mapping" and in File/Directory i put my local    proyect path "/home/mysite"
In "Absolute path on the server" i put the path in the server where are the proyect: "/var/www/html/mysite"

In "Remote PHP Debugging" I set:

Name: xxxx
Servers: the server created previously
IDE key: PHPSTORM

It doesn’t work with these settings. I am using Chrome with the Xdebug extension with the Ide key PHPstorm key.

What I do not need to work?

+4
source share
1 answer

, , . XDebug , XDebug, , ( ).

- SSH . ssh-config ( ~/.ssh/config) :

Host example
    Hostname 192.168.2.1
    User johndoe
    LocalFoward 9200 127.0.0.1:9000

, -on console -

ssh example

(192.168.2.1) (login) johndoe 9200 9000 . , .

, .:)

0

Source: https://habr.com/ru/post/1584676/


All Articles