Follow the tutorials on the Internet and configure as shown below:
However, the installed xdebug module can never be seen in phpinfo
Follow the tutorials on the Internet and configure as shown below:
However, the installed xdebug module can never be seen in phpinfo
There may be multiple configuration files. It is recommended that you look for Loaded Configuration File
and Additional .ini files parsed
on the phpinfo page to find the corresponding php.ini
file to configure xdebug
. Execute php --ini
under the command line and you can see the configuration file loaded under the cli. The two are likely to be different. Don’t configure it wrong.
Your version of xdebug is probably wrong.
1 xdebug is often used for var_dump printing and formatting. It seems convenient.
2 Use it with wincachegrind to analyze and optimize the code.
If you just want to format and print the array, here is a method for you.
<code>/**</code>
php output debugging
@param unknown $vars
@param string $label
@param string $return
@return string|NULL
*/
static function dump($vars, $label = '', $return = false) {
<code> if (ini_get('html_errors')) { $content = "<pre class="brush:php;toolbar:false">\n"; if ($label != '') { $content .= "<strong>{$label} :</strong>\n"; } $content .= htmlspecialchars(print_r($vars, true)); $content .= "\n\n"; } else { $content = $label . " :\n" . print_r($vars, true); } if ($return) { return $content; } echo $content; return null;
}
You can just define it as global