rdebug_show_stack_state
NAME
rdebug_show_stack_state(): Show worker's current stack state (applies to debugged routines only).TYPE
ProcedureDESCRIPTION
This procedure is part of the rdebug API.
rdebug_show_stack_state() shows the stack state of the worker: the stack of routine called at the point in time at which rdebug_show_stack_state() is executed.
A worker's routine may call upon a second routine, which, in turn, may call upon a third routine, and so forth. rdebug_show_stack_state() will present:
- Routine name in the stack
- Time at which each routine has been called
- Current statement ID for each routine (see rdebug_show_routine_statements()).
Execution of this routine only makes sense on an active debugging session, i.e. after calling rdebug_start().
SYNOPSIS
rdebug_show_stack_state() READS SQL DATA
EXAMPLES
Show the stack state of a running worker:
In the above, analyze_continents() was invoked at 2013-03-30 16:52:13. At 2013-03-30 16:52:16, and at statement ID 127 it called upon analyze_continent_cities(), currently waiting on statement ID 93.mysql> call rdebug_show_stack_state(); +-------------+----------------+--------------------------+--------------+---------------------+ | stack_level | routine_schema | routine_name | statement_id | entry_time | +-------------+----------------+--------------------------+--------------+---------------------+ | 1 | test | analyze_continents | 127 | 2013-03-30 16:52:13 | | 2 | test | analyze_continent_cities | 93 | 2013-03-30 16:52:16 | +-------------+----------------+--------------------------+--------------+---------------------+
To clarify, it is impossible to verify from the above whether additional routines are being called, which have no debug info. rdebug does not know anything about such routines, and only presents data for those routines compiled with debug mode.