Home >Backend Development >PHP Problem >How to install xdebug extension in php

How to install xdebug extension in php

藏色散人
藏色散人Original
2021-06-17 09:10:325052browse

How to install xdebug extension in php: 1. Enter the xdebug official website; 2. Paste the current phpinfo information on the user download guide page; 3. Download the plug-in and place the plug-in in the specified directory; 4. Add xdebug settings; 5. Check whether the plug-in is installed successfully; 6. Configure phpstorm.

How to install xdebug extension in php

The operating environment of this article: windows7 system, phpstorm 2020 version, DELL G3 computer

php install xdebug extension, PHPStorm XDebug single step Debugging

Scenario

When using IDE editors such as phpstorm to write PHP code, in order to make debugging more convenient, we need to install a PHP extension plug-in xdebug. The current running environment of this example is the phpstudy integrated environment.

step1 Enter the xdebug official website and enter the user download guide page

  1. Enter the URL in the browser: https://xdebug.org or directly search for xdebug to enter the website.

  2. Click download below to enter the download page. Click on the custom installation instructions link.

#step2 Paste the current phpinfo information on the user download guide page

  1. Open the phpinfo page
  2. Right click View the source code, select and copy all
  3. Switch to the user download guide page, paste the phpinfo information you just copied into the input box
  4. Click the analyze my phpinfo() output button below, and the system will Recommended xdebug plug-in suitable for the current PHP version information

##step3. Download the plug-in, And put the plug-in in the specified directory

step4. Open php.ini and add xdebug settings to the file

    Open the php.ini file
  1. Add the following lines of information at the end of the file


zend_extension = "D:\phpStudy2018\PHPTutorial\php\php-7.1.13-nts\ext\php_xdebug-2.7.2-7.1-vc14-nts.dll"xdebug.remote_enable=1xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000xdebug.idekey="PHPSTORM"

step5 Restart phpstudy and check whether the xdebug plug-in is installed Success

step6 Configure phpstorm

##After the above steps, we have installed the xdebug extension of php and configured the relevant configurations in phpstorm. Now we can use the xdebug function of phpstorm for debugging.

The above is the detailed content of How to install xdebug extension in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn