How to debug php code in remote server with phpstorm [closed]
Question
I come from the .net world, where F5 on visual studio just triggers debug and hits the breakpoints easily.
I dont have a local dev server, but I do have a remote dev server and I already setup the environment in phpstorm and magicento. (so magento development)
I used this tutorial: https://www.youtube.com/watch?v=ReOzltfka9o
Can I debug remotely, lets say I upload a new php file, trigger the execution on the server, and then I want to hit a breakpoint locally? How can I do that?
THanks
Solution
Remote debugging is possible with PhpStorm.
First you have to install Xdebug on your remote server and allow remote debugging with xdebug.remote_enable=On
in the xdebug.ini.
Then you have to configure the server and the path mapping in PhpStorm under Settings > PHP > Servers.
After this you can enable the listener (the little telephone icon) and open the project in the browser. PhpStorm should now recognize the connection and stop at the breakpoints.