Local environment Xampp+phpstorm+xdebug+chrome Configuration and breakpoint debugging

Source: Internet
Author: User

Do not understand phpstorm+xampp+chrome combination of phpstorm configuration Xdebug breakpoint debugging, many kinds of Web methods have been seen, usable, but not up to expectations. QQ Group asked, a Daniel very strange I have configured how still not correct, very simply say Remote Assistance. Ha-soon people say readily to do neat things, I haven't said thank you Daniel directly said something 88.

Today I finally understand, in fact it is easy to understand, leisure time to put the configuration process to write, by the way mark, the need for people to see. In fact, today, "Love you, flinging" is screening, I look for, today coincides with the yuan, days Chuin family interests appear big noisy, so-called a play pave the way, to the extreme contradictions, will meet the end of the time, I write this configuration process forgot to look unexpectedly give, find empty fill up. Hope this configuration process you read like a story, or a pat brick:

My installation Environment: XAMPP version number V3.1.0;p hpstorm version 8.0.3;windowsxp 32bit. Your ladyship will take a look first, lest it affect the meaning.

XAMPP, Phpstorm are installed directly in the D packing directory, 9999m directory is built under D:\xampp\htocts, that is, the Directory Project folder path is D:\xampp\htocts\9999m. In Phpstorm>file>open, locate 9999m, click OK, load 9999m to Phpstorm (the installation environment path changes itself as needed, and the configuration content is similar later). Figure 1

1. Start server-side configuration: Install XAMPP, stop Apache Service (note that if you exit XAMPP directly, you will not stop Apache).

2. Locate the php.ini in the installation directory, similar to D:\xampp\php\php.ini, and open it.

3. Find the item that was commented out (remove the previous?) ) and set it as follows:

[XDebug]

Zend_extension = "D:\xampp\php\ext\php_xdebug.dll"

Xdebug.profiler_append = 0

xdebug.profiler_enable = 1

Xdebug.profiler_enable_trigger = 0

Xdebug.profiler_output_dir = "D:\xampp\tmp"

Xdebug.profiler_output_name = "cachegrind.out.%t-%s"

Xdebug.remote_enable = On

Xdebug.remote_handler = "DBGP"

Xdebug.remote_host = "127.0.0.1"

Xdebug.trace_output_dir = "D:\xampp\tmp"

xdebug.idekey= Phpstrom

The initial setting is this: Figure 2

The meaning is to be commented out, so first remove;

Then turn on the xdebug.remote_enable = on;

Also to increase xdebug.idekey= phpstrom.

Where Remote_host refers to the debug client's address, that is, the IDE's IP, the same remote_port is the client's port, these two in the case of remote debugging attention to modify, remote when the final change:

[XDebug]

Zend_extension = "D:\xampp\php\ext\php_xdebug.dll"

Xdebug.profiler_append = 0

xdebug.profiler_enable = 1

Xdebug.profiler_enable_trigger = 0

Xdebug.profiler_output_dir = "D:\xampp\tmp"

Xdebug.profiler_output_name = "cachegrind.out.%t-%s"

xdebug.remote_enable = 1

Xdebug.remote_handler = "DBGP"

Xdebug.remote_mode = "req"

Xdebug.remote_port = 9000

4. Save the file and restart the Apache check if the Xdebug service has been successfully opened. Figure 3

One way to enter D:\xampp\php\php.exe-m in CMD is to see Xdebug, which indicates the successful opening of Xdebug. Figure 4

Another way to open localhost for the browser, locate Phpinfo () Click Open Configuration, find the Xdebug entry, find the description xdebug the configuration was successful. Figure 5

At this point, the server-side configuration is complete.

5. The following is client-side debugging. Open Phpstorm, enter file>settings>php, here to interpreter Browse, fill D:\xampp\php\php.exe, automatically recognize the version. Figure 6

6. Enter File>settings>php>servers, here to fill out the server side of the relevant information, name fill localhost,host fill localhost,port fill 80,debugger choose Xdebug. Figure 7

7. Go to File>settings>php>debug, see Xdebug tab, Port Fill 9000, other default. Figure 8

8. Enter FILE>SETTINGS>PHP>DEBUG>DBGP proxy,ide key to fill in the Phpstorm,host fill in the Localhost,port 9000, click OK to exit the settings. Figure 9

9. Enter run> Debug configurations, point + number, server optional localhost,start URL fill http://localhost/9999m, Browse to fill Chrome, click OK to exit the settings. Figure 10

Click OK to exit the setup, the Phpstorm is automatically populated with localhost next to the Run button, and the Run button is activated by gray to be green. If the start URL is filled with http://localhost, without filling in 9999m, then when the Phpstorm Run button is clicked, the browser enters the default address http://localhost, no way to directly access http://localhost/9999m. Figure 11

Chrome browser link configuration. Find the corresponding plugin, chrome for phpstrom IDE support CHROME.CRX, download it yourself and drag the file to Chrome Settings > extensions. The Add JB icon in the top right corner of Chrome is the plugin that was successfully installed. Figure 12

11. Open the Monitor in the Phpstorm, is a phone-like button, click into Green, click in the program code point, set the program segment point, click the Green Debug Crawler button, Chrome browser opens Xdebug page, Phpstorm appears the Debug window, And get to the variables value, that is, to see the following debug information, indicating a successful configuration. Figure 13

12. Links really good, http://www.chenxuanyi.cn/xampp-phpstorm-xdebug.html

is the 7th step "7. Enter FILE>SETTINGS>PHP>DEBUG>DBGP proxy,ide key to fill in the Phpstorm,host fill Localhost,port fill 80. "You need to change the port to fill 9000." The point is 100 likes.

13. Page map does not allow direct pasting, so make a number map N, Khan Bar. You can do 10 first, and the rest of the sequence is not going to be a blind change.

It's more than two hours to be careless.

Local environment Xampp+phpstorm+xdebug+chrome Configuration and breakpoint 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.