you may only use these constants *after* the line that loads the extension. dynamically loaded extension (either a PHP extension or a Zend extension), Open it and add the following line zend_extension=/usr/lib/php/20190902/xdebug.soĪfter If you use constants in your value, and these constants belong to a Ensure that the PHP language level and the CLI interpreter match what you use on the command line. just to be certain, you should also use the PhpStorm Validate Debugger dialog (task C.9 above) Screenshots of Step C (PhpStorm configuration) Task 1: xdebug-phpstorm-01 2250×1200 252 KB. Once Xdebug is installed, we need to configure PhpStorm to work with it. You should add "zend_extension=/usr/lib/php/20190902/xdebug.so" to php.iniįind where is my php.ini. All tasks in this step take place in the Settings dialog of PhpStorm. Triple check that (just in case: CLI and web server may be using different php.ini ensure that the right URL is used etc) 2) Share whole Xdebug section of phpinfo () output captured via browser 3) Enable Xdebug log, try to debug and share the resulting. When it's done, system told me Build process completed successfully One screenshot (phpinfo) shows like its 2.x while PhpStorm (last screenshot) shows 3.0.1. I can install xdebug sudo pecl install xdebug sudo apt-get install xdebugīut, it gave me the error "phpize" didn't find. When I go through the xdebug website, I knew that I need to install PHP development headers. So, install php-dev sudo apt-get install php-dev So, in this paragraph, I will write down how I install Xdebug and config with PHPStorm in Ubuntu.įollowing the instructions of the Xdebug website, I try to install Xdebug with PCEL. And many developers using PHPstorm as an IDE. But how to debug it when you meet a problem? You can use echo, but it will make your web page messy. Make sure you have xdebug installed and in php.ini uncomment xdebug.modedebug Open Settings->Languages & Frameworks->PHP->Debug, Assign Debug Port value, you can find this port from php.ini. Go to Run > Debug then select the configuration what we made earlier (PHP Remote Debug):Ĭ.To develop a PHP project, Ubuntu is a good choice. Set breakpoint, and turning on Start Listening for PHP Debug Connectionī. To validate your debugger configuration, go to Settings > PHP > Debug and click on 'Validate debugger configuration on the web server'. You can find the required settings in the transcript or in the comments of this article. The following is my php. Make sure to add the necessary Xdebug configuration settings to the php.ini file. I setup my interpreter and it says that the correct Debugger is installed on XAMPP but then when I run the 'Validate Debugger Configuration on Web Server' tool in PHPStorm it gives the error: No debug extension is loaded. Go to Run > Web Server Debug Validation, on Path to create validation script I point the value into my public path of project, and URL to validation script I point to my nginx docker host.Ī. I seem to be hitting the same problem with both. Local path to create validation script: C:\sources\myplugins\plugins\privateer-page-types (the local source directory) Clicking validate now properly shows the php.ini file, xdebug, remote host, etc. Go to Run > Edit Configurations., create a new PHP Remote Debug configuration:ĭ. First, you need to find your ‘php.ini’ file by running this command: php -ini. Go to Preferences > PHP > Debug > Dbgp Proxy, set like this (note: IDE Key must same with the value of xdebug.idekey on php.ini):Ĭ. Once you’ve installed Xdebug, you need to configure PHP to use it. Go to Preferences > PHP > Debug, set like this:ī. When I started the project I set it up as a local web server option and I'm worried that I haven't changed the correct settings to now make this a. After selecting an Interpreter, we are going to map our working project with container path, my working project path is $HOME/DOO/api docker and I will map into /var/www/, so change the Docker container value:Ī. For the debugging configuration, I have a PHP Remote Debug that validates correctly although it always defaults to the 'Local Web Server or Shared Folder' rather than the 'Remote Web Server' option. Go to `Preferences > PHP, add new interpreter, select new interpreter from Docker, vagrant, etc.Ĭ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |