The debug facility displays application processing details through messages that can be:
See constant of the debug package
Level | Name | Description | PL/SQL 4.2 Message |
---|---|---|---|
1 | error | critical error | Error |
2 | warn | less critical error | Warn |
4 | info | default level if debugging is enabled (for example, used by apex_application.debug) | Info |
5 | app_enter | application: messages when procedures/functions are entered | Enter |
6 | app_trace | application: other messages within procedures/functions | Trace |
8 | engine_enter | Application Express engine: messages when procedures/functions are entered | |
9 | engine_trace | Application Express engine: other messages within procedures/functions |
Through the Apex URL
Valid values for the DEBUG flag include:
Values | Description |
---|---|
LEVELn | Enable debug with the level n of debug detail (between 1 and 9) |
YES | Enable debug with the level 4 |
NO | Disable debug |
Enabled:
BEGIN
APEX_DEBUG.ENABLE(apex_debug.c_log_level_info);
-- Before 4.2: APEX_DEBUG_MESSAGE.ENABLE_DEBUG_MESSAGES (apex_debug.c_log_level_info);
END;
where:
Disabled
BEGIN
APEX_DEBUG.DISABLE();
END;
You can reference the Debug level flag using the following syntax:
Package:
This package provides APIs to instrument and debug PL/SQL code:
since 4.2
is the main procedure to add messages to different levels.
There is also shortcut procedure for each level
Example: Enter: level 5
procedure foo (
p_widget_id in number,
p_additional_data in varchar2,
p_emp_rec in emp%rowtype )
is
begin
apex_debug.enter('foo',
'p_widget_id' , p_widget_id,
'p_additional_data', p_additional_data,
'p_emp_rec.id' , p_emp_rec.id );
....do something....
end foo;
See the following procedure: