21.8 GET_LAST_MESSAGE_ID Function

This function returns the identifier for the last debug message that was generated in this session. The value is null until the first debug message has been generated.

Syntax

APEX_DEBUG.GET_LAST_MESSAGE_ID (
  RETURN NUMBER );

Example

The following example prints the message identifiers before and after emitting debug output.

BEGIN
    sys.dbms_output.put_line('Page View ID='||apex_debug.get_last_message_id);
    apex_debug.message('Hello', p_force => true);
    sys.dbms_output.put_line('Page View ID='||apex_debug.get_last_message_id);
END;