In Preferences, check Languages & Frameworks > PHP > Debug > Skipped Paths (there’s no warning in Event Log if a script is skipped.) Are you trying to verify an AJAX request, when, for example in WordPress, you have previously blocked admin-ajax.php to avoid spawning a new debug session every time autosave is triggered? You may have configured Remote debugging to skip certain paths.“Debug session was finished without being paused”. Is there one? Check the Event Log pane – there will be a warning message, e.g. By default Xdebug won’t do anything if no breakpoints were found.If PhpStorm is not listening this will be blank. You can verify PhpStorm is actually listening on the correct port with the lsof command (this example from macOS):ĬOMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME You can verify both ends of this, the phpinfo() output will confirm what port Xdebug will send on.Does the Xdebug section of phpinfo() have this warning: “XDEBUG NOT LOADED AS ZEND EXTENSION”? You’re meant to use zend_extension=xdebug.so, not extension=xdebug.so – go to the wizard, paste in your phpinfo() contents and it’ll generate a fully customised set of commands to run ( PHP > Debug > Xdebug).Is Xdebug installed? (check phpinfo() output).You can use developer tools to verify the cookie is being sent. Ensure the bookmarklet (recommended) or browser addon you’re using to start/stop debugging is activated.If nothing happened at all, go to section A. Make sure PhpStorm is listening for PHP Debug Connections (bottom of Run menu, or green telephone icon top right), then reload your app in the browser.Ī) an ‘Incoming connection’ dialog the very first time you open a webpage of your app.ī) ‘Debug session was finished without being paused” in the Event Log.Įither of these confirms Xdebug is talking to PhpStorm and you can need not worry about your php.ini entries, the possibility you’re using the wrong port or that you forgot to trigger the bookmarklet – goto section B. Step 1: you should identify whether it’s a complete lack of communication between Xdebug and the IDE, or if PhpStorm is receiving the data the data but is setup wrong.Ĭlose and restart PhpStorm. ( The following is based on Xdebug 2.4.0RC4 and PhpStorm 2016.2.1) On other installations, here’s my growing checklist when I try to use Xdebug and nothing happens: Then run vagrant provision to build/rebuild (this won’t affect your site). To turn on xdebug, make sure you’ve got: php_xdebug_default_enable: 1 CLI: /Applications/DevDesktop/apache/bin/apachectl -k restart.the UI but with keyboard shortcuts, cmd-2 (stop) then cmd-1 (start).Uncomment the zend xdebug extension and turn on remote_enable zend_extension=xdebug.so Acquia Dev Desktop:Įdit /Applications/DevDesktop/php7_1/bin/php.ini There’s an element of “it just works” for Xdebug in the server/PhpStorm configuration when using Acquia Dev Desktop or Drupal VM. (In fact, I don’t think it’s worked correctly first time for me once.)Īlso, you’ve probably got multiple projects, maybe running on different VMs, or using Docker (scroll down for special instructions for Docker on the Mac). Unfortunately, while the setup should be straightforward, it’s easy to lose the programming time you save spending ages tweaking your Xdebug and PhpStorm configuration to get it to work in the first place.
#Phpstorm blog manual
No need to manual add var_dump() statements etc.
#Phpstorm blog code
htaccess Apache Banana Pi Bash Scripting config.xml Snippets Cool stuff Debugging File opereations Filesystem Operations Filesystem Operations GIT Hardware Helper Home Automation Interesting stuff JavaScript Layout Linux Magento Microboards Module Development MySQL Network Stuff PHP PHP snippets Plesk Publications Python Raspberry Pi Raspbian Raspbian Setup script snippets SSH Statistics and information Subversion system.Running Xdebug remotely is very useful – you can add breakpoints, inspect and modify the state of all variables/objects and type PHP code into a live console.