Skip to Main Content

Testing the new apex_debug.get_last_message_id

Message ID: 1478708583000

Error ID: 1478708583001

get_page_view_id: 1478708583

The code below generates an APEX_Debug message and an APEX_Debug error, returning the IDs for both.

            

declare
    l_last_msg_id number;
    l_last_err_id number;

    pvid number;
begin
    APEX_DEBUG.ENABLE; 

    APEX_DEBUG.MESSAGE ('Simple debug message on the page');
    l_last_msg_id := apex_debug.get_last_message_id;

    APEX_DEBUG.ERROR ('An error message on the page');
    l_last_err_id := apex_debug.get_last_message_id;

    pvid          := apex_debug.get_page_view_id;
    
    htp.p('<div>
                <p><b>Message ID: </b>'||l_last_msg_id||'</p>
                <p><b>Error ID: </b>'||l_last_err_id||'</p>
                <p></p>
                <p><b>get_page_view_id: </b>'||pvid||'</p>
            </div>');

    APEX_DEBUG.DISABLE;        
end;