1DECLARE
2 l_value varchar2(100) := 'test value';
3 l_long_msg VARCHAR2(32767) := 'output anything up to varchar2 limit';
4BEGIN
5 APEX_DEBUG_MESSAGE.ENABLE_DEBUG_MESSAGES(p_level => 3); -- 1 is most important
6 APEX_DEBUG_MESSAGE.LOG_MESSAGE( -- Short message (4000 max)
7 p_message => 'l_value = ' || l_value, p_level => 1 );
8 APEX_DEBUG_MESSAGE.LOG_LONG_MESSAGE(
9 p_message => l_long_msg, p_level => 1 ); -- Long message
10 APEX_DEBUG.INFO('Information message');
11END;
1PROCEDURE my_proc (p_id IN NUMBER, p_emp IN emp%ROWTYPE) IS
2BEGIN
3 APEX_DEBUG.ENTER('my_proc', 'p_id', p_id, 'p_emp.id' , p_emp.id);
4 APEX_DEBUG.LOG_PAGE_SESSION_STATE; -- saves all items
5 MY_PACKAGE.MY_FUNCTION;
6 APEX_DEBUG.LOG_DBMS_OUTPUT(p_prefix=>'[Debug] ');
7 APEX_DEBUG.INFO('my_proc successfully finished.');
8EXCEPTION
9 WHEN OTHERS THEN APEX_DEBUG.ERROR('Critical error %s', sqlerrm);
10 RAISE;
11END;
1SELECT adb.APEX_USER,
2 adb.APPLICATION_ID, wal.APPLICATION_NAME, adb.PAGE_ID,
3 adb.MESSAGE, adb.MESSAGE_TIMESTAMP,
4 adb.PAGE_VIEW_ID, adb.SESSION_ID
5FROM APEX_WORKSPACE_ACTIVITY_LOG wal
6INNER JOIN APEX_DEBUG_MESSAGES adb
7ON wal.DEBUG_PAGE_VIEW_ID = adb.PAGE_VIEW_ID;
1SELECT * FROM APEX_WORKSPACE_ACTIVITY_LOG
2 WHERE WORKSPACE = 'wks_name'
3 AND APEX_USER = 'user_name'
4 AND APPLICATION_ID = 'app_id';
5
6SELECT * FROM APEX_DEBUG_MESSAGES;