Configuring Phpstorm Debugging PHP

Source: Internet
Author: User

Configuring Phpstorm Debugging PHP

First Step: Configure XDebug

Download install XDebug to the local environment (refer to: Zend Studio 9.x + xampp + XDebug Debug Environment installation detailed), open php.ini, refer to the following configuration:
[XDebug]
zend_extension = "D:\PHP\xampp2\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\PHP\xampp2\tmp
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port=9000
xdebug.trace_output_dir = "D:\PHP\xampp2\tmp"

Note: The integration environment such as Phpstudy has been integrated into various versions of Xdebug, just tick xdebug in PHP extensions and then restart the service for immediate use.

Step Two: Configure the phpstorm in the XDebug

Path: Debug Settings, Languages & Frameworks, File------

Step Three: Configure the phpstorm in the Server

Path: PHP--Servers, Languages & Frameworks, File--Settings

Note : If the so-called "remote server" is local, you do not need to tick "Use Path mappings (Select if the servers is remote or symlinks is used)"

Fourth step: Set Debug items

Click the "Lower Triangle" button as shown, select "Edit Configurations" and the "Run/debug configrations" dialog box appears:

Fifth step: Start Debugging Page

Click on the " phone button " on the toolbar, turn on the monitoring of the debug port, then click on the " beetle button " To start debugging the page.

Special Instructions: because the setting is: When debugging, open the project's "Home", so when you click on the "Beetle button", it will open "home".

Don't worry about it open the "home", the above action is just to open Phpstorm debugging monitoring function, when we enter in the browser to debug the page (Remember to press "enter"), such as page Http://127.0.0.4:8088/home/Test/test, It will automatically jump to the breakpoint at the page, as shown in:

Click the Debug button, step by Step Debugging it (shortcut key F5)!

A few shortcut keys that are commonly used

F5: Step into

F6: Step over

F7: Step out

Reference:

Https://www.adayinthelifeof.nl/2012/12/20/debugging-remote-cli-with-phpstorm

Extended reading:

"Summary 2" phpstorm Debugging PHP skills with Xdebug

Related logs:

VirtualBox installation centos5.x net:registered protocol family 2 stuck problem

"Summary 2" phpstorm Debugging PHP skills with Xdebug

What case tool does a beginner UML use? Rational Rose2007 (v7.0) cracked version download

Intellij the difference between facets and artifacts in idea 14.x

Fix XP under "Cannot install this installer package through the Windows Installer service." You must install a Windows service Pack with an updated version of the Windows Installer service. "The question

PHP Most powerful development tool Phpstorm registration code Collection

"Highly recommended" using NAT, Host-only dual virtual network card to realize CentOS6.3 networking in virtual box

Zend studio/ecliplse plugin easyexplorer, open the folder where the resource files are located

Windows host uses VMware to install Linux (CentOS) virtual machines, Host-only connected to the Internet in a detailed way

Git's Load Putty key option is not available (why-load-putty-key-is-disabled-in-tortoise-git)

Article reprinted from: http://blog.snsgou.com/post-825.html

Configuring Phpstorm Debugging PHP

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.