The APEX_APPLICATION
package enables users to take advantage of global variables. The apex_application.g_debug
variable refers to whether debugging is currently switched on or off. Valid values for this variable are TRUE
or FALSE
.
Turning debug ON
shows details about application processing.
For example:
IF apex_application.g_debug THEN apex_debug_message.log_message('Custom Validation'); END IF;
Including the preceding code in the APEX page, anywhere where PL/SQL is allowed, will add information visible in APEX_DEBUG_MESSAGES
, and therefore in the View Debug page. This information will only be added when apex_application.g_debug
evaluates to TRUE
.