1 person found this helpful
Check out the "Debugging an application" part of the APEX builders manual
Then starting adding some apex_debug.message() calls
That would probably be the best way forward.
Thanks Scott. I use those tools extensively in the dev environment but they are unavailable in the runtime environment. In the APEX Installation guide it refers to Managing a Runtime Environment in the Application Builder User's Guide (like you said) but a search there returns nothing. I looked in the Administration Guide and found how to export the workspace from dev to runtime, then import the application. There is no mention if the debug tools are then available of if that changes the runtime to a dev environment.
MESSAGE is passing in a string and LOG_PAGE_SESSION_STATE seems useful but there is no indication on how to use them in the application
Where would I add calls within the application? in the page process?
APEX_DEBUG.ENABLE (p_level => 2);
APEX_DEBUG.LOG_PAGE_SESSION_STATE (p_level => 1);
INSERT INTO MDM_DATA.REF_CMR(STORE_CD)
(SELECT * FROM TABLE(MDM_DATA.UTIL.SPLIT(:P401_STORE_LIST,':')));
SET CMR_MARKET = NVL(:P400_CURRENT_MKT,:P400_NEW_MKT_NAME)
WHERE UPPER(CMR_MARKET) = 'UNASSIGNED';
UPDATE MDM_DATA.REF_CMR RC
SET RC.CITY_NM = (SELECT CITY_NM FROM MDM_DATA.MD_STORE S WHERE S.STORE_CD = RC.STORE_CD)
WHERE RC.CITY_NM IS NULL;
You may call it anywhere you want to log something usefull. In APEX page processes, in functions that called from APEX pages.
Usually I use it before and after some critical function calls. Before i log parameters, after i log results.
apex_debug.message('Calling function XXX with params:'||param1);
result := XXX(param1);
apex_debug.message('function XXX returned:'||result);
Could you clarify what you mean by unavailable? What does it say?
Also check the application properties to ensure debugging is allowed.
I think you should be able to turn on debugging at all times using the URL (if the app allows it).
If you can't open the debug output using the developer toolbar, try using the view APEX_DEBUG_MESSAGES
"APEX runtime environment enables you to run production applications, but it does not provide a web interface for administration. A runtime environment only includes the packages necessary to run the application, making it a more hardened environment." Hence the developer tool bar is not available. It looks like I need to try using the APEX_DEBUG_MESSAGES per your suggestion and NoGot suggestion. I will get back after giving that a try.