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