PHPStorm configuration XDebug debugging PHP code details course

Source: Internet
Author: User
PHPStorm configure XDebug Debug PHP code detailed tutorial
[PHP configuration]
Install xdebug for PHP. the method is omitted.

Configuration file php. ini
[XDebug]
Zend_extension = "C: \ xampp \ php \ ext \ php_xdebug.dll"
; Enable automatic tracking
Xdebug. auto_trace = On
; Enable exception tracking
Xdebug. show_exception_trace = On
; Enable automatic start of remote debugging
Xdebug. remote_autostart = On
; Enable remote debugging
Xdebug. remote_enable = 1
; Collect variables
Xdebug. collect_vars = On
; Collect return values
Xdebug. collect_return = On
; Collect parameters
Xdebug. collect_params = On
Xdebug. trace_output_dir = "C: \ xampp \ tmp"
Xdebug. profiler_append = 0
Xdebug. profiler_enable = 1
Xdebug. profiler_enable_trigger = 0
Xdebug. profiler_output_dir = "C: \ xampp \ tmp"
Xdebug. profiler_output_name = "cachegrind. out. % t-% s"

Xdebug. idekey = PhpStorm
Xdebug. remote_handler = "dbgp"
Xdebug. remote_host = "127.0.0.1"

Xdebug. remote_port = 9000

Phpstorm configuration]
File> Settings> ages & Frameworks> PHP> Servers

Add a Server.

File> Settings> Languages ages & Frameworks> PHP> Debug

On the XDebug tab, set port to 9000.

File> Settings> ages & Frameworks> PHP> Debug> DBGp Proxy

Set the IDE key to phpStorm, the host to localhost, and the port to 82.

Browser settings (Firefox and Google use another method)

Interconnect shards.

Run> Edit deployments

Add a Web Debugging server

Start listening

After a breakpoint is set in phpstorm, start the listener, which is the same as the phone number. When you use chrome to browse a file with a specified breakpoint in localhost, the file automatically enters the breakpoint and the debugging information is displayed in phpstorm.

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.