T-DEBUG is a possibility to see a content of the form in real time.
The tool shows:
  • ITEMS' values, their properties.
  • GLOBALS' values.
  • PARAMETERS' values.
  • SYSTEM VARIABLES' values.
  • BLOCKS' properties.
  • CONTEXT values.
It needs for you to add to the form a reference to Object Library without any changes in the form.
You can configure a call to a debug window from a menu or by a pressed key.


The T-DEBUG tools has an ability to write a trace file into a file or on the fly into a trace variable with the apportunity to see trace at any time of the form's running.
The trace does not interrupt to the running process (like a form message statements).
You can add trace messages to your code and no remove them in a production, because the trace really puts messages according to a flagged global variable.

Program code

PACKAGE BODY FILTER IS
  procedure event(event_name varchar2) is
     current_item  varchar2(100) := :system.trigger_item;
     current_block varchar2(100) := :system.current_block;
     v_alert       number;
     v_sum_balance number;
     V_NAME varchar2(1000);
     v_out_file varchar2(100);
     v_where varchar2(10000);
  begin
  	 if event_name !='POST-QUERY' then
  	    t.ProgStart('event_name: '||event_name||' current_block: '||current_block||
  	                    ' current_item: '||current_item); 
  	 end if;
  	 if event_name  =  'CLEAR_ALL' then
       if current_block <> 'FILTER' then
         go_block('FILTER');
       end if;
       :GLOBAL.search_client_id_2   := null;
       :GLOBAL.search_client_id     := null;
       :GLOBAL.search_CLIENT_TYPE_2 := null;
       :GLOBAL.search_CLIENT_TYPE   := null;
       clear_block(no_validate);
       :FILTER.IS_CLOSED_TOO   := 'N';

       go_item('FILTER.CLIENT_ID_2');

     elsif event_name  =  'WHEN-VALIDATE-ITEM'  then
       if current_item = 'FILTER.CLIENT_ID_2' then
          t.p(':FILTER.CLIENT_ID_2: '||:FILTER.CLIENT_ID_2);  
           if :FILTER.CLIENT_ID_2 is null then
	           :FILTER.CLIENT_ID     := null;
	           :FILTER.CLIENT_TYPE   := null;
	           :FILTER.CLIENT_TYPE_2 := null;
	           :FILTER.CLIENT_NAME   := null;
             :GLOBAL.search_client_id_2   := null;
             :GLOBAL.search_client_id     := null;
             :GLOBAL.search_CLIENT_TYPE_2 := null;
             :GLOBAL.search_CLIENT_TYPE   := null;
           else
             begin
           	   SELECT CLIENT_ID,CLIENT_TYPE
                 INTO  :FILTER.CLIENT_ID,:FILTER.CLIENT_TYPE
                 FROM RM_CLIENTS
                WHERE CLIENT_ID_2=:FILTER.CLIENT_ID_2 ;
               :FILTER.CLIENT_NAME := Get_Desc_Query_Pkg.get_client_desc_query(:FILTER.CLIENT_ID,
                                                                             :FILTER.CLIENT_TYPE);
             exception
		           when others then
		             SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
	               :FILTER.CLIENT_NAME   := null;
	           end;
           end if;
       end if;

     elsif event_name  =  'QUERY'  then
       if :FILTER.CLIENT_NAME is null or not Check_If_Null('FILTER') then
         raise form_trigger_failure;
       end if;

       GO_BLOCK('FR_ACCOUNTS_VW');
       CLEAR_BLOCK(NO_VALIDATE);
       execute_query;

     elsif event_name  =  'WHEN-NEW-BLOCK-INSTANCE'  then
        t.p(':GLOBAL.search_client_id_2: '||:GLOBAL.search_client_id_2);	 
       if :GLOBAL.search_client_id_2 is not null then
	       :FILTER.CLIENT_ID_2   := :GLOBAL.search_client_id_2;
         :FILTER.CLIENT_TYPE_2 := :GLOBAL.search_client_type_2;
         GO_ITEM('FILTER.CLIENT_ID_2');
         execute_trigger('WHEN-VALIDATE-ITEM');
       end if;
       t.p(':GLOBAL.search_client_id: '||:GLOBAL.search_client_id);	
       if :GLOBAL.search_client_id is not null then
	       :FILTER.CLIENT_ID   := :GLOBAL.search_client_id;
         :FILTER.CLIENT_TYPE := :GLOBAL.search_client_type;
         :FILTER.CLIENT_NAME := Get_Desc_Query_Pkg.get_client_desc_query(:FILTER.CLIENT_ID,
                                                                         :FILTER.CLIENT_TYPE);
       end if;
       if :FILTER.CLIENT_ID_2 is not null then
         GO_ITEM('FILTER.QUERY');
       end if;

  	 elsif event_name  = 'SEARCH_CLIENT' then
       go_item('FILTER.client_id_2');
       :parameter.par_block_name := :system.current_block;
       :FILTER.OBJ_ID := null;
       :QUERY_CLIENTS.CLIENT_ID := :FILTER.CLIENT_ID;
       :QUERY_CLIENTS.CLIENT_ID_2 := :FILTER.CLIENT_ID_2;
       go_block('QUERY_CLIENTS');

  	 elsif event_name  = 'PRINT_EXCEL' then---Hodaya 02/2015
       --print excel file
    --create file
            WRITE_EXCEL_PKG.Write_Excel_fr_accounts 	(:PARAMETER.P_WHERE,v_out_file);
            V_NAME :=  computer_data_pkg.get_url_string||:global.GLOBAL_IMAGE_PATH||v_out_file;--:rm_client_images.downloaded_file;
            web.show_document(V_NAME,'_SELF');
  	 end if;
  	 if event_name != 'POST-QUERY' then
    	  t.ProgEnd('event_name: '||event_name); 
     end if;
   exception 
  	 	when form_trigger_failure then
    	    t.ProgEnd('event_name: '||event_name||' form_trigger_failure'); 
  	 	   raise form_trigger_failure;
  	 	when others then
  	 	   d.p('event_name: '||event_name||' current_block: '||current_block||
  	                    ' current_item: '||current_item ||' Exception: '||sqlerrm);
       	 t.ProgEnd(event_name||' Exception: '||sqlerrm);
  end event;
END;  


Trace

TRACE Start : 12-Feb-2015 08:52:13
Database    : orc1
USER        : CHK7
--------------------------------
Start : event_name: WHEN-NEW-BLOCK-INSTANCE current_block: FILTER current_item: FILTER.CONTRACT_ACC_NUM
  :GLOBAL.search_client_id_2:
  GLOBAL.contract_acc_num: 10003716
  Start : event_name: WHEN-VALIDATE-ITEM current_block: FILTER current_item: FILTER.CONTRACT_ACC_NUM
  End   : event_name: WHEN-VALIDATE-ITEM
End   : event_name: WHEN-NEW-BLOCK-INSTANCE
Start : event_name: WHEN-VALIDATE-ITEM current_block: FILTER current_item: FILTER.CONTRACT_ACC_NUM
End   : event_name: WHEN-VALIDATE-ITEM
Start : event_name: WHEN-VALIDATE-ITEM current_block: FILTER current_item: FILTER.CLIENT_ID_2
End   : event_name: WHEN-VALIDATE-ITEM
Start : event_name: QUERY current_block: FILTER current_item: FILTER.QUERY
  Start : event_name: POST-RECORD current_block: FR_ACTIVITY_FOLDERS_VW current_item:
  End   : event_name: POST-RECORD
  Start : event_name: POST-RECORD current_block: FR_ACTIVITY_FOLDERS_VW current_item:
  End   : event_name: POST-RECORD
  Start : event_name: PRE-QUERY current_block: FR_ACTIVITY_FOLDERS_VW current_item:
    v_where: 1=1 AND CONTRACT_ACC_NUM = :FILTER.CONTRACT_ACC_NUM AND FOLDER_STATUS = 'פתוח'
  End   : event_name: PRE-QUERY
  Start : event_name: POST-QUERY current_block: FR_ACTIVITY_FOLDERS_VW current_item:
    v_FoldersList: ,
    1078743 ? 1078743
    v_dummy: 2
    Image plus
    :FR_ACTIVITY_FOLDERS_VW.PLUS_MINUS: plus
  End   : event_name: POST-QUERY
  Start : event_name: POST-QUERY current_block: FR_ACTIVITY_FOLDERS_VW current_item:
    v_FoldersList: ,
    1078743 ? 1078742
  End   : event_name: POST-QUERY form_trigger_failure
End   : event_name: QUERY
Start : event_name: WHEN-NEW-RECORD-INSTANCE current_block: FR_ACTIVITY_FOLDERS_VW current_item: FR_ACTIVITY_FOLDERS_VW.ACTIVITY_NAME_DISP
End   : event_name: WHEN-NEW-RECORD-INSTANCE