If you initiate a Zero-configuration debugging session without having configured a Debug server, upon establishing connection PhpStorm displays the Incoming Connection dialog where suggests importing mappings from a server access configuration ( deployment configuration). When using Xdebug, xdebug.remote_connect_back (for Xdebug 2) or xdebug.discover_client_host (for Xdebug 3) can be used for troubleshooting. The value can be a host name (for example, localhost) or an IP address of the machine where PhpStorm is running, and it must be pingable from the server. allow_hosts (for Zend Debugger) are properly configured. Make sure that xdebug.remote_host (for Xdebug 2), xdebug.client_host (for Xdebug 3), or zend_debugger. You can use or a similar service to check for opened inbound ports. This can be verified by running telnet host 9000 (for Xdebug) or telnet host 10137 (for Zend Debugger) from remote server (where host is an IP address of your local machine running PhpStorm) and checking a connection is established. Verify no firewall, router or ISP is blocking the connection. Before launching the script, make sure that either a breakpoint is set or the Break at first line in PHP scripts option is enabled on the Debug page of the Settings dialog Control+Alt+S. This will ensure PhpStorm reacts when a debugging session is started and opens the Debug tool window automatically. In PhpStorm, enable listening to incoming debug connections by either clicking ( in the classic UI) on the toolbar/the status bar or selecting Run | Start Listening for PHP Debug Connections in the main menu. In the Settings dialog ( Control+Alt+S), navigate to PHP | Debug and make sure PhpStorm and Xdebug / Zend Debugger are configured with the same port numbers. When using a remote PHP interpreter, verify the steps outlined in Remote debugging via SSH tunnel. When using Zend Debugger, make sure the generated PhpStorm bookmarklets or a Browser Debugging Extension is configured to use the correct IP address and port. For more information, refer to the Xdebug documentation. In the Xdebug configuration, make sure xdebug.remote_host and xdebug.remote_port ( xdebug.client_host and xdebug.client_port for Xdebug 3) are correct. Make sure Xdebug or Zend Debugger are configured to connect to the host and port PhpStorm is running on. When the debugger cannot connect or refuses the connection, check the following: If any errors or warnings are present on the first lines, it's recommended to fix them before continuing. The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.20,Ĭopyright (c) 1999-2018, by Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans To verify that no startup warnings or errors are displayed, run the following command: PhpStorm will also not be able to recognize the debugger being used. When this is the case, the debugger may fail to work. When running PHP, it can happen that a startup warning or error is displayed. To validate the debugging engine configuration, perform the steps described in Validate the configuration of a debugging engine Startup warnings and errors preventing the debugger from working To avoid this problem, you need to update the corresponding sections in the php.ini file as described in Configure Xdebug and Configure Zend Debugger. These tools cannot be used simultaneously because they block each other. To debug PHP code with PhpStorm, make sure that you have a debugging engine, either Xdebug or Zend Debugger, installed and configured properly. Making sure Xdebug or Zend Debugger are installed and configured When logging is no longer needed, it is recommended that you disable it. The log file will not automatically roll over or be truncated and may grow to a vast file size.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |