After xdebug is installed in php, var_dump () cannot input variable content. solution:

Source: Internet
Author: User
Tags php development environment

Someone asked why var_dump () cannot input the variable content after php installs xdebug. the variables in it are directly output rather than output the content in the variable, next we just need to configure xdebug to solve the problem.

In the php development environment, after the xdebug module is installed, the output results of var_dump () will be easier to view, but by default, the output results of var_dump () will change: too many array elements are not displayed. string variables only display the first N characters, and deeper array elements are also displayed as ellipsis. This may cause some inconvenience. We need to modify the configuration file and set it.

Add the following to the xdebug node in php. ini:

Xdebug. var_display_max_children = 128
Xdebug. var_display_max_data = 512
Xdebug. var_display_max_depth = 5

The details are as follows:


Xdebug. var_display_max_children = 128


The parameter type integer. The default value is 128.


Displays the maximum number of object attributes. More than not displayed

Xdebug. var_display_max_data = 512


The parameter type integer. The default value is 512.
Maximum Data Length displayed

Xdebug. var_display_max_depth = 3

The parameter type integer. The default value is 3.
Display maximum nested Series

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.