Documentation Home
MySQL PHP API
Download this Manual
PDF (US Ltr) - 2.4Mb
PDF (A4) - 2.4Mb


MySQL PHP API  /  ...  /  mysqli::debug, mysqli_debug

3.8.11 mysqli::debug, mysqli_debug

Copyright 1997-2022 the PHP Documentation Group.

  • mysqli::debug

    mysqli_debug

    Performs debugging operations

Description

Object-oriented style

public bool mysqli::debug(string options);

Procedural style

bool mysqli_debug(string options);

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: <field_1>:<field_2>:<field_N> Each field consists of a mandatory flag character followed by an optional , and comma separated list of modifiers: flag[,modifier,modifier,...,modifier]

Table 3.9 Recognized Flag Characters

option characterDescription
OMYSQLND_DEBUG_FLUSH
A/aMYSQLND_DEBUG_APPEND
FMYSQLND_DEBUG_DUMP_FILE
iMYSQLND_DEBUG_DUMP_PID
LMYSQLND_DEBUG_DUMP_LINE
mMYSQLND_DEBUG_TRACE_MEMORY_CALLS
nMYSQLND_DEBUG_DUMP_LEVEL
ooutput to file
TMYSQLND_DEBUG_DUMP_TIME
tMYSQLND_DEBUG_DUMP_TRACE
xMYSQLND_DEBUG_PROFILE_CALLS


Return Values

Returns true.

Examples

Example 3.40 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
mysqli_report