![]() Don't forget to set a breakpoint in your PHP file. If you use the vagrant-librarian-puppet example you can test it with. Make this file executable with chmod +x cli_debug.sh and now you can start debugging of PHP CLI scripts with. Copy the previous server config and rename it to application. PHPStorm uses the serverName to determine the right server. Php enable debugging you must specify the idekey and the serverName. #!/bin/bashĮxport XDEBUG_CONFIG="idekey=PHPSTORM" &Įxport PHP_IDE_CONFIG="serverName=application" & Please create a file in your vagrant box with name cli_debug.sh and put the following lines in this file. Don't forget to set a breakpoint in your PHP file.Ī Shell script is necessary for remote CLI debugging. To avoid upcoming popups open the settings File -> Settings -> Languages & Frameworks -> PHP -> Server and remove the path of the file and set only the project root path. If the cookie is set and you have enabled listening for incoming debug connections in PHPStorm a popup window should appear to configure your PHP servers. There is a great Firefox add-on "The easiest Xdebug". To start debugging you must set a cookie because autostart debugging is not enabled. This IP address is the gateway of the vagrant box. The important point is xdebug.remote_host which can change on other system configurations, but it should work for the most common use cases. Open your /etc/php5/conf.d/20-xdebug.ini (path depends on OS) and add the following lines: fault_enable=1 Make sure you have installed the PHP Xdebug extension ( sudo apt-get install php5-xdebug). ![]() To enable debugging you must configure Xdebug. ![]() If you use this Vagrant box you can skip "Enable Xdebug PHP extension" and the URL is Enable Xdebug PHP extension If you don't have a Vagrant box you can use my vagrant-librarian-puppet example. First we will cover how to enable PHP remote debugging in PHPStorm if Vagrant is used and because this is so easy we also write a short Shell script to use remote PHP CLI debugging e.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |