Firefox+phpstorm 8+xdebug Single Step commissioning

Source: Internet
Author: User
Tags php debug

1. Need to fill in the php.ini in the relevant configuration of xdebug;

(in Wampserver, you need to left-click the Wampserver icon, through the menu to edit the php.ini configuration; If you overwrite php.ini directly, it will be overwritten by Wampserver)

At the very end of the php.ini, make the following settings:

;(subject to the actual path)

Zend_extension = "D:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"

[Xdebug]

Xdebug.remote_enable = On

Xdebug.profiler_enable = Off

Xdebug.profiler_enable_trigger = Off

Xdebug.profiler_output_name = cachegrind.out.%t.%p

;(subject to the actual path)

Xdebug.profiler_output_dir = "D:/wamp/tmp"

Xdebug.show_local_vars=0

Xdebug.idekey = "Phpstorm"

Use only the Remote debug feature of Xdebug, do not use the profiler function, Idekey for the development environment (such as "Phpstorm", "Zend Studio"), the browser to communicate (said to use more Firefox, debugging extended stability ; Chrome's debugging extension is not good.)

2. Go to Phpstorm file->setting, find php->servers on the left, add a Web development server. Host and port fill in the actual address of the development server, the actual service port. Debugger Select Xdebug.

3. Locate Php->debug in the Settings dialog box and make sure that Phpstorm listens to the Xdebug debug Port 9000. No other modifications are made.

(if PHPFPM is used, or if fastcgi is manually configured, there may be a 9000 port occupancy conflict; You need to reassign the port)

4. Enter PHP->DBGP Proxy, fill in IDE Key "Phpstorm", host is native, Port is 80:

5. Enter "Web Browsers", only check Firefox, all other browsers removed;

6. Create a new project, plus a test php file, to ensure that it is correctly uploaded to the server

(In the Tools->deployment->configuration dialog box, Deployment path cannot be empty, must be set to "/" at least, set to NULL, cannot be deployed, Deployment appears dimmed)

7. Check the "Run->start Listening for PHP debug Connection" and the IDE starts listening on the debug port;

8. Install the PHP debug extension "The easiest Xdebug 2.1.1-signed" in Firefox, restart the Firefox browser, set the following parameters for the debug extension:

This is consistent with php.ini and does not open trace and profiler.

9. Three more icons in the toolbar on the right side of the Firefox browser, press the crawler icon to enable debugging (any tab can be used):

10. In the Phpstorm find the suspended "Firefox" icon, click on it (you can also click the upper arrow, Run xxx.php), you can see the breakpoint in a tick, indicating that the breakpoint has been effective. Click "Step Over" in the window below to see the tick in the breakpoint disappears. The reaction speed is somewhat slow.

It is now possible to step through PHP code, ENJOY it!

After configuration, if you need to step through debugging, tick "Run->start listenning for PHP debug Connections" in Phpstorm, click "Crawler" icon in Firefox browser, Run the page you want to debug in Phpstorm (no need to go through the Phpstorm Debug startup mode, run directly).

Firefox+phpstorm 8+xdebug Single Step commissioning

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.