Answer the question
In order to leave comments, you need to log in
Debugging a remote script with xdebug+phpstorm
So, there is a script that is launched on a remote server by cron every N minutes, I need to debug it, I didn’t think of anything better than looking towards remote debugging through xdebug. But so far it has not been possible to put it into practice. My provider issues one external ip to the entire network, so I can’t be seen from the outside. Is this a significant problem when setting up remote debugging? Or is it a bigger problem that the script being run is located outside the root folder of the web server and there is no way to access it through the browser line?
Answer the question
In order to leave comments, you need to log in
Or is the bigger problem that the script being run is outside the root folder of the web server and there is no way to access it through the browser line?
habrahabr.ru/post/146547/ - that's about remote debugging, but how to catch cron - it would be interesting to know for yourself.
XDEBUG_CONFIG="idekey=PhpStorm1" php ./cron.php
Don't forget to enable the "Start Listening PHP Debug Connections" button in PhpStorm.
I wrote about remote debugging here
1. Forward the port in the router.
2. Configure xdebug correctly: remote_connect=1, remote_port=9000, remote_enabled=1
3. Get DynDNS on the router (more convenient than locally). Or always substitute your ip in xdebug.remote_host
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question