![]() ![]() To have PhpStorm accept any incoming connections from Xdebug engine through the port specified in the Debug port field, select the Can accept external connections checkbox. By default, the Debug port value is set to 9003,9000 to have PhpStorm listen on both ports simultaneously. You can specify several ports by separating them with a comma. For Xdebug 3, the default port has changed from 9000 to 9003. ![]() ![]() This must be the same port number as specified in the php.ini file:īy default, Xdebug 2 listens on port 9000. In the Xdebug area, specify the following settings:ĭebug port: appoint the port through which the tool will communicate with PhpStorm. In the IDE settings ( Control+Alt+S), select Debug under the PHP node to open the Debug page. Learn more about checking the Xdebug installation in Validate the configuration of a debugging engine. If no debugger is configured, PhpStorm shows the corresponding message:Īlternatively, open the Installation Wizard, paste the output of the phpinfo(), and click Analyze my phpinfo() output. The name and version of the debugging engine associated with the selected PHP installation (Xdebug or Zend Debugger). The version of the selected PHP installation. The CLI Interpreters dialog that opens shows the following: The list shows all the PHP installations available in PhpStorm, see Configure local PHP interpreters and Configure remote PHP interpreters. On the PHP page, choose the relevant PHP installation from the CLI Interpreter list and click next to the field. Press Control+Alt+S to open the IDE settings and then select PHP.Ĭheck the Xdebug installation associated with the selected PHP interpreter: In the Troubleshooting guide, you will find the description of some common issues and learn how to troubleshoot them.Configure Xdebug in PhpStorm Check Xdebug installation When using Xdebug or Zend Debugger with PhpStorm, some misconfiguration can prevent the debugger from working. For more information, refer to the Create a run configuration for a test target procedure. Set up a remote PHP interpreter as described in Configure remote PHP interpreters.īesides running an entire application, you may want to run a PHPUnit or Behat test that covers a specific class, function or scenario, with the debugging engine attached. Debugging a PHP CLI scriptĭepending on your environment, you can debug your PHP CLI script locally or remotely.įollow the Debug a PHP CLI script procedure. To check for opened inbound ports, you can use or a similar service. Here, host is the IP address of the local machine PhpStorm is running on. To test direct connection, run the telnet host 9000 (for Xdebug) or the telnet host 10137 (for Zend Debugger) command on the remote server and ensure that connection is established. Otherwise, if direct connection cannot be established, follow the Remote debugging via SSH tunnel procedure. If you can establish direct connection between your machine and the remote server, that is, no firewall, router or ISP is blocking the connection from your remote server to the specific port on the local machine, follow the Zero-configuration debugging procedure. The debugging engine is running on a remote environment (for example, a remote server or a virtual machine).įollow the Zero-configuration debugging procedure. The debugging engine and PhpStorm are running on the same machine. Debugging a PHP web applicationĭepending on your environment, you can debug your PHP Web application locally or remotely. See Zero-configuration debugging for the detailed step-by-step instructions, and Advanced debugging scenarios for more debugging scenarios. Start the debugging session in the browser using the installed browser extension.ĭuring a debugging session, examine the program state: see variable values, evaluate expressions, step through the program, and so on. For more information about getting started with Twig and Blade debugging, refer to Debug Twig templates and Debug Blade templates. Line breakpoints can be set only on executable lines, but not on comments, declarations, or empty lines. Breakpoints can be set in the PHP context inside PHP, HTML, TWIG, BLADE, and files of other types. On the PhpStorm toolbar, toggle ( in the classic UI) to start listening for incoming PHP debug connections, or choose Run | Start Listening for PHP Debug Connections from the main menu. With the debugging engine installed, you can start debugging by following the zero-configuration debugging approach:Ĭhoose and install the browser extension suitable for your browser. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |