Y
Y
YaRobot2018-10-11 19:57:48
PHP
YaRobot, 2018-10-11 19:57:48

How to use xdebug on a remote server?

upd: added php tag, because began to write about js

Greetings.
There is a problem, I can not set up work with xdebug on a remote server. I use it locally all the time, but here it was required on a remote server.
At first I followed the standard scheme with phpstorm.
There is a local project directory, there is a remote deployment directory via sftp.
Installed xdebug on the server, configured the config.
In the storm, I chose php web page, indicated the server. And there is an obvious problem here.
My server is https and the storm substitutes http. If you want to specify a mapping, the storm sends you far and for a long time.
In deploy https works fine. But for some reason it didn’t work with debugging.
Well, I think, let's try to set up vscode.
Here I ran into two problems at once.

  • Organize work with data and auto-deploy via sftp. Luckily I found the plugin.
  • Again, tweaking xdebug. Specified path mapping and how to specify the server, did not find. As a result, it is not clear where mapitsya.

Can anyone help set up one of the editors/ide?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
i, 2018-10-26
@ilyarsoftware

A universal approach regardless of the remoteness of the server:
1. Set up xdebug.ini on the remote server :

xdebug.remote_enable=on
xdebug.remote_connect_back=on

2. Install Xdebug helper ( chrome , firefox ) in the browser.
3. Open the landing page and click debug in Xdebug helper .
4. In the IDE, we sew to listen to Xdebug .
5. Landing page reload.
Next, the IDE asks to match the addresses of the local and the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question