oracle apex charging debug

DECLARE
    l_value varchar2(100) := 'test value';
    l_long_msg VARCHAR2(32767) := 'output anything up to varchar2 limit';
BEGIN
    APEX_DEBUG_MESSAGE.ENABLE_DEBUG_MESSAGES(p_level => 3);  -- 1 is most important
    APEX_DEBUG_MESSAGE.LOG_MESSAGE(					-- Short message (4000 max)
        p_message => 'l_value = ' || l_value, p_level => 1 ); 
    APEX_DEBUG_MESSAGE.LOG_LONG_MESSAGE(
        p_message => l_long_msg, p_level => 1 );   	-- Long message   
    APEX_DEBUG.INFO('Information message');
END;

0
5

                                    SELECT * FROM APEX_WORKSPACE_ACTIVITY_LOG 
    WHERE WORKSPACE = 'wks_name'
    AND APEX_USER = 'user_name'
    AND APPLICATION_ID = 'app_id';
    
SELECT * FROM APEX_DEBUG_MESSAGES;

0
0
0
10

                                    PROCEDURE my_proc (p_id IN NUMBER, p_emp IN emp%ROWTYPE) IS
BEGIN
    APEX_DEBUG.ENTER('my_proc', 'p_id', p_id, 'p_emp.id' , p_emp.id);
    APEX_DEBUG.LOG_PAGE_SESSION_STATE;	-- saves all items
    MY_PACKAGE.MY_FUNCTION;				
    APEX_DEBUG.LOG_DBMS_OUTPUT(p_prefix=>'[Debug] ');
    APEX_DEBUG.INFO('my_proc successfully finished.');
EXCEPTION
    WHEN OTHERS THEN APEX_DEBUG.ERROR('Critical error %s', sqlerrm);
        RAISE;
END;

0
0
4.1
10

                                    SELECT adb.APEX_USER,
       adb.APPLICATION_ID, wal.APPLICATION_NAME, adb.PAGE_ID,
       adb.MESSAGE, adb.MESSAGE_TIMESTAMP,
       adb.PAGE_VIEW_ID, adb.SESSION_ID
FROM APEX_WORKSPACE_ACTIVITY_LOG wal
INNER JOIN APEX_DEBUG_MESSAGES adb
ON wal.DEBUG_PAGE_VIEW_ID = adb.PAGE_VIEW_ID;

4.1 (10 Votes)
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source