Phpstorm Configuring Xdebug Debugging

Source: Internet
Author: User

1. Go to the official website to download Xdebug, pay attention to your PHP version to choose.

Official website: https://xdebug.org/download.php
It is also important to note that before downloading, you need to check your PHP version and the phpinfo version (where the 32-bit 64-bit selection is determined by whether PHP is 64-bit or 32-bit, not 64 and 32 of the system)
This line can see whether PHP is 32-bit or 64,x86 32-bit.

Here you can see what the PHP version is.

If the PHP version contains NTS, you need to download
PHP php版本(版本应为5.4) VCx (32/64 bit)
In this format, otherwise download
Does not contain the download:
PHP php版本(版本应为5.4) VCx TS(32/64 bit)

Note that the PHP version here needs to be matched, the VCX or VCX TS need to match, and the number of digits to match.

2. Configure PHP.ini

PHP.ini can be found based on location or through integrated tools, which need to be configured as follows:

[XDebug]xdebug.profiler_output_dir="D:\phpStudy\tmp\xdebug"xdebug.trace_output_dir="D:\phpStudy\tmp\xdebug"zend_extension="此处为下载的dll位置路径,不要有中文,以.dll结尾"xdebug.remote_port=9000 xdebug.remote_enable=on xdebug.remote_handler = dbgp

Note that the remote port here does not configure the error

3. Running Php.exe

Open php-5.4.45 (your PHP corresponding path) directory, php.ini directory, click Php.exe, if not show fail is configured successfully, after restarting the server, view phpinfo information is correct, including xdebug information is configured successfully.

4. Interpreter Configuration

Open the Phpstorm menu item file->settings->language&frameworks->php Select the right side of the interpreter ..., configure

After the configuration is complete, you will need to debug the port in the submenu of PHP, which is the same as the port number set in the Xdebug.remote_port above.

5. Run the URL configuration

Phpstorm has a small downward arrow in the upper right corner, which has a submenu: configurations select it.
Click the plus sign in the upper left corner to select PHP Web application

Configure URLs and ports here. Note At this point, the URL point to the directory is the best root directory, or debug failed, where the URL and the site URL and port consistent.

6. Need to install Jetbrain IDE support (Google's Web Debugging tool), can be in:

Https://pan.baidu.com/s/1dG21Lj7
71is
here to download.
After downloading, open the chrome top right corner and more tools, extensions, drag and drop the CVx file here to install, do not make any configuration here.

7. Commissioning

At this point, you can add a breakpoint in the first line of the run by default at Run->break. x in the top right corner by clicking on the small phone:

Let it become the effect of debugging, you can see the automatic debugging, breakpoints into the first line.
Debug successfully performed as: 1 Debug line turns blue:

2. The lower panel debug Green arrow, you can view the relevant variables in the Upper tab debugger. The following are the basic features.

Phpstorm Configuring Xdebug Debugging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.