E
E
Edd Step2019-11-05 23:02:55
xdebug
Edd Step, 2019-11-05 23:02:55

How to set up xdebug + phpstorm on remote server 2.0?

I’ll write right away for those who reach out for remarks like “they didn’t teach you to google” or “there is a tradition on the toaster”, I rummaged sooooo much, at first a harmless yet another misunderstanding of the situation seemed temporary, but after sorting through a lot of material on this topic. I already think this is a real problem that I'm not the only one facing. I really hope for the help of people who will show practical advice where to dig. I asked this question a week ago, but a couple of comments ridiculed the question, apparently it was my fault that the question was superficially stated, and without special code and pictures.
And so the essence of the question, How to configure xdebug to catch code on a remote server in phpstorm.
Prelude.
I have been quietly developing my website. I have xampp installed locally, xdebug is configured, all work is deployed from the phpstorm project to the local server, and after testing, I uploaded everything I needed to the working store with my hands.
When updating one of the modules, I encountered the fact that the module interacts with someone else's code (a module on ioncube with binding to a domain), which is not possible to enable on the local and debug the code. I decided that there is no other way out, which is to set up xdebug remotely and trace the relationship with someone else's code. And then it began, in short, I’ve been digging the Internet for a week, it doesn’t work (((.
What I did for this.
1. First, I installed xdebug on the server. Installed the extension on centos 6
yum install php-pecl-xdebug.x86_64
2. configured php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.6.so
zend_extension_ts = /usr/local/ioncube/ioncube_loader_lin_5.6_ts.so
zend_extension = /usr/lib64/php/modules/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_host = myIP
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_connect_back = 1
xdebug.remote_autostart=on
xdebug.idekey = "PHPSTORM"

VESTA is installed on the server, as can be seen from the records, ion_cube is also installed there
3. Set up a remote interpreter on phpstorm
5dc1c7043d687383127894.png
4. Created a server
5dc1c7d2be1cb227661003.png
5 Added Deployment via FTP for synchronization and set up mapping
5dc1c93d77859767124605.png
5dc1c944bd141067104889.png
6 Checked validation
5dc1c9cdc1894738529442.png
7. Created a configuration for debugging
5dc1ca86008d5910006165.png
The browser already has an extension for catching the code, since it was already working on the local server.
And .... everything))) began dancing with tambourines.
To get started, put Break at first line , see how
5dc1cbe25f6ea407080072.png
Reaction 0 works.
I dug up the entire Internet, I tried it. does not catch. Thoughts were different that phpstorm ignores the remote php and listens to the local one, but the extensions have different versions, this can be seen in the screenshot, on remote 2.5.5 on local 2.2.5. After a couple of days of searching for an error, I remembered that I needed to register a port for a secure connection 443, I was delighted, I thought this was the reason, it also does not work.
I read that phpstorm is not friendly with https on this issue, to check I made a new project for a regular connection (there is a spare domain, installed the engine on a new site, configured it, it also does not work). Read about ssh tunnel. I set up the connection, in putty
5dc1d0e85185c292463165.png
in php.ini
xdebug.remote_host = 127.0.0.1
also does not work for me ((.
Out of desperation, I mounted a remote to my windows, hoping to run the debug as locally, but I don’t quite understand how it can work, I abandoned it.
In search of errors, I came across something that cast doubt
5dc1d2e210114918865814.png
on the info,
5dc1d38a3a1ba050976169.png
although in php.ini I
xdebug.remote_enable = 1
tried to configure the PHP Web Page configuration, it is also configured, but does not catch.
Help, I really hope that the solution is somewhere nearby and I do not see it.
To finally make sure that xdebug works correctly on the server side, I think how to see that the xdebug extension sends something to port 9000. I really don’t know how, I’m not strong in the admin panel ((.
Tell me where to dig, HELP!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Edd Step, 2019-11-10
@e_do

I will share, maybe it will be useful for someone. As always, everything turned out to be easier than expected. The solution is in the router, or rather, it was necessary to forward the ports needed on the router. After that, it worked, but not everything ((.
Another problem appeared. Doesn’t want to work correctly with https. Only if Break at first line is enabled. Doesn’t see breakpoints in the project. And on certain pages, the response is 500 in the browser.
As far as I understand, it’s connected with rules in .htaccess.

P
Papa, 2019-11-06
Stifflera @PapaStifflera

Maybe NAT?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question