In the Troubleshooting guide, you will find the description of some common issues and learn how to troubleshoot them. When using Xdebug or Zend Debugger with PhpStorm, some misconfiguration can prevent the debugger from working. To learn how to do it, follow the Create a test configuration for a specific 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. Enable the Xdebug option: Can accept external connections and Additionally listen on Xdebug 3 default port 9003. 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 details on 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. Php -S 0.0.0.0:80 -t /var/On the PhpStorm toolbar, toggle to start listening for incoming PHP debug connections, or choose Run | Start Listening for PHP Debug Connections from the main menu. This is a simple bash script: #!/usr/bin/env bash We use a bash script named start-container as the default command for the image. So, we'll see xdebug.remote_host=192.168.1.2 in xdebug.ini for now. This means the container is reaching out of the container to my host machine to send debugging information. We use my Mac's private network IP address for the remote_host, as this configuration is telling xdebug where to reach PHPStorm, which will be listening on my host machine for xdebug connections. RUN chmod x usr/local/bin/start-containerĬMD File xdebug.ini zend_extension=xdebug.so
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |