![]() Under this mechanism, the debugger evaluates whether PHP can generate internal executable bytecode for the current line. Resolve breakpoint if it's not available on the current line (Xdebug 2.8+): the selected checkbox enables support for the Xdebug breakpoints resolving mechanism. 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 9000,9003 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 ( Ctrl+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 Ctrl+Alt+S to open the IDE settings and select PHP.Ĭheck the Xdebug installation associated with the selected PHP interpreter: In this way you can put multiple breakpoints and debug the code.Configure Xdebug in PhpStorm Check Xdebug installation Once you accept it, you will be automatically taken to you phpstorm's breakpoint. ![]() For the first time phpstorm you will ask be asked for confirmation dialogue box to accept connection from browser. Next, Again visit your browser and load any page (localhost/drupal7). Now open your browser & click on Start debugger in the bookmark toolbar.Īgain, Goto phpstorm. Open PhpStorm with drupal 7 project & click Start listen for PHP Debug connections (These option are at Top Right corner of your phpstorm) Now its time to debug our drupal 7 site with phpstorm & your browser. Now Drag & drop - Start debugger & Stop debugger to your browsers bookmarks Bar. Note : IDE key should be PHPSTORM, as we set in PhpStorm settings. Go to page & Generate XDebugger bookmarks. Once you have enabled extension then you need to add Debugger bookmarklets for chrome. Next, Goto you browser, install an Xdebug helper extension. Next, Open PhpStorm -> File -> Default Settings -> In the search box search with debug, Change Debug port to 9001, apply and ok.Īgain Open File -> Default Settings -> Search for IDE Key, Set IDE key as PHPSTORM, Apply & OK Next, you need to add below lines to the php.ini file zend_extension="/usr/lib/php5/20131226/xdebug.so" Next, you got to the php.ini file, in my case its located in /etc/php5/apache2/php.ini Or to find where its is located you can find by this command $ locate php.ini Next find the path of the file where xdebug.so is located, you can find by this command $ locate xdebug.so In my case, since xdebug is already installed, it showing xdebug else you should install the xdebug., follow below command to install xdebug. With Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans With Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies Initally open terminal, and check the php version The configuration made in this article refers specifically to the Ubuntu machine, which has Apache2 webserver running and xDebug installed. Debugging the code is one of the important process for a developer, So now this article will help you to configure the Phpstorm for debugging the Drupal 7 application with the help of xDebug. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |