Wampserver+phpstorm+xdebug Environment Configuration Debug PHP code

Source: Internet
Author: User

This article mainly introduces about the Wampserver+phpstorm+xdebug environment Configuration debugging PHP Code, has a certain reference value, now share to everyone, the need for friends can refer to

Wampserver+phpstorm+xdebug Environment Configuration Debug PHP code

    • Wampserver Installation

    • Phpstorm Installation

    • Xdebug Installation

    • Phpstorm under Commissioning

Wampserver Installation

Wampserver installation is relatively simple, only need to download wampserver.exe, all the way next down can

Phpstorm Installation

Phpstorm Download Address: https://www.jetbrains.com/phpstorm/
Phpstorm Hack method: Http://www.oyksoft.com/soft/40722.html?pc=1
After the installation is complete, if phpstorm still does not crack correctly, see if your host file has 0.0.0.0 account.jetbrains.com added, the specific host file storage location is: C:\Windows\System32 \drivers\etc

Xdebug Installation

By default, if you install the Wampserver,xdebug plugin is installed by default, Specific Xdebug installation path can be found by looking at php.ini, find the method is left click Wampserver program icon, find PHP options, find php.ini, click into, Search [Xdebug], where zend_ The value of extension is your xdebug storage location, in order to be able to debug PHP code in Phpstorm, we need to add the following code to the last side of the [Xdebug] tab of php.ini:

Zend_extension = "E:/studysoftware/wampserver/wamp/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11.dll" xdebug.remote_enable = 1xdebug.profiler_enable = Offxdebug.profiler_enable_trigger = Offxdebug.profiler_output_name = Cachegrind.out.%t.%pxdebug.profiler_output_dir = "E:/studysoftware/wampserver/wamp/tmp" xdebug.show_local_vars= 0xdebug.idekey=phpstorm  xdebug.remote_enable = on  xdebug.remote_host=localhost  xdebug.remote_port= 9000  XDEBUG.REMOTE_HANDLER=DBGP

After the configuration is complete, restart Wampserver, then enter localhost in the browser, find Phpinfo, click to go in, search Xdebug, find the following:

Install Xdebug plugin under Google Chrome

Download Address: http://www.downza.cn/soft/211550.html
After the download is complete, click on the spider icon in the top right corner and select the option to enter the contents as shown in the

Phpstorm Debug Configuration

(1): File->settings->languages&frame works->php->servers Configure server-related settings, as shown in the configuration

(2): File->settings->languages&frame WORKS->PHP->DEBUG->DBGP Proxy configuration Related Settings, as shown in the configuration:

(3): File->settings->languages&frame works->php-debug Find the corresponding Debug settings on the right window, change the port to 9000, the configuration as shown in the following:

Phpstorm for commissioning

(1): In Google Chrome input: http://localhost/startwill/index.php, of course, this address you change yourself
(2): Click the Xdebug plugin in Google Chrome, select the Debug option

(3): In Phpstorm open a our own PHP file, here my is the index.php file, set a breakpoint, click on the upper right corner of the Debug button:

(4): After you press ENTER in the browser, it will be executed at the breakpoint we set.

Reference documents

    • Http://developer.51cto.com/art/201704/536857.htm

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.