![phpstorm debugger phpstorm debugger](https://i2.wp.com/www.linsoftware.com/wp-content/uploads/2017/06/phpstorm-interactive-console-during-debugging-copy.png)
![phpstorm debugger phpstorm debugger](https://cdn.deliciousbrains.com/content/uploads/2021/04/09094132/phpstorm-debugger-watches.png)
The path might be different for you depending on how you installed it. This is because certain Xdebug features, such as step debugging, require zend. If you’ve installed PHP extensions before, you may be wondering why you have enabled other extensions with just extension=x.so. With zend_extension we load the PHP extension we installed. This xdebug page will help you visualize the communication process and learn about the configuration of PHP and xdebug.Zend_extension = /usr/lib64/php/modules/xdebug.so xdebug.remote_enable = 1 xdebug.remote_autostart = 1 Load your page and your phpStorm debugger should catch the debug message being sent from your server for that page load.
#Phpstorm debugger code
Start phpStorm and open the debugger with Run | Debug | and in the code of your project pick a module you want to debug and set a debug break point.Ĭlick the new xdebug icon the Firefox plugin installed in your toolbar to send a message to your web server “start a debug session”.
#Phpstorm debugger install
Go to Firefox add ons and install theeasiestxdebug extension. Make sure you set the IDE session key to the same value you put in your xdebug config file.
![phpstorm debugger phpstorm debugger](https://cdn.deliciousbrains.com/content/uploads/2017/02/13114725/Run_Debug_Configurations1.png)
Give the config a name and attach it to the server you just setup. Go to the Run / Debug menu and add a new configuration. For example, my project file/directory ~/SLP/wp-content/plugins is mapped to the /server/websites/myslp-dashboard-beta/wp-content/plugins directory. Map the SERVER absolute paths to your current project files. Set the public URL to the site you are connecting to and the port. In phpStorm go to the Preferences Menu then look for servers under the PHP entry.Īdd a name for your server. This is usually some 192.168 address NOT the public IP you used above. Configure your firewall to port forward port 9000 to local port 9000 on the local IP of your laptop. You’ll need to make sure that when your web server sends along the “let me connect to port 9000” your firewall knows which laptop to send it to. Restart your web server (nginx in my case) and if you are using FPM or another PHP accelerator restart that as well. I’m on PHP 7 so it is in my PHP 7 config dir under /etc/php/7.0/mods-available/xdebug.ini.Īdd some lines to tell xdebug to allow remote connections to your soon-to-be-listening IDE (leave the first line to the zend_extension for xdebug in place): The Setup On AWSĮdit the php ini file for xdebug that was installed. This assumes you have some clue about system admin and local system configuration. Local box running MacOS Sierra with the latest 2016.3 phpStorm and a Firefox browser.
#Phpstorm debugger how to
How to connect to two? Here are my hints from the deployment. The problem is my code is running in the cloud and my codebase is local on my laptop. Live debugging with code tracing and memory stack access is a far better way to go. I need to know why and I’m tired of hard-hacking the code on the staging site with error logs. This week I have been running into some challenges with the MySLP SaaS service and while the app works fine on my local setup it is not behaving the same way on the staging deployment out in the cloud. I’ve been using phpStorm to do local debugging of my WordPress app on a VVV box for a few years now.