On this page
mysqli::debug
mysqli_debug
(PHP 5, PHP 7, PHP 8)
mysqli::debug -- mysqli_debug — Performs debugging operations
Description
Object-oriented style
public mysqli::debug(string $options): true
Procedural style
mysqli_debug(string $options): true
Performs debugging operations using the Fred Fish debugging library.
Parameters
options-
A string representing the debugging operation to perform
The debug control string is a sequence of colon separated fields as follows:
Each field consists of a mandatory flag character followed by an optional<field_1>:<field_2>:<field_N>,and comma separated list of modifiers:flag[,modifier,modifier,...,modifier]Recognized Flag Characters optionscharacterDescription O MYSQLND_DEBUG_FLUSHA/a MYSQLND_DEBUG_APPENDF MYSQLND_DEBUG_DUMP_FILEi MYSQLND_DEBUG_DUMP_PIDL MYSQLND_DEBUG_DUMP_LINEm MYSQLND_DEBUG_TRACE_MEMORY_CALLSn MYSQLND_DEBUG_DUMP_LEVELo output to file T MYSQLND_DEBUG_DUMP_TIMEt MYSQLND_DEBUG_DUMP_TRACEx MYSQLND_DEBUG_PROFILE_CALLS
Return Values
Always returns true.
Changelog
| Version | Description |
|---|---|
| 8.0.0 | This function now always returns true. Previously it returned false on failure. |
Examples
Example #1 Generating a Trace File
<?php
/* Create a trace file in '/tmp/client.trace' on the local (client) machine: */
mysqli_debug("d:t:o,/tmp/client.trace");
?>
Notes
Note:
To use the mysqli_debug() function you must compile the MySQL client library to support debugging.
See Also
- mysqli_dump_debug_info() - Dump debugging information into the log
- mysqli_report() - Alias of mysqli_driver->report_mode
© 1997–2023 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/mysqli.debug.php