On the OTN forum someone was asking today…
Can I determine if I am running a page “normally” or with the developer toolbar visible, ie as a developer? If this were the case, I’d add in a condition on this to ensure it was always available to me when developing but not to end users.
After looking around in the APEX packages I found the global variable WWV_Flow_Developer_Toolbar.g_ok_to_show_toolbar, but the problem with this package is that it’s not public and you can’t access it in your application.
But there is another package which is public and which gives you the information that you are running in “developer mode“.
IF APEX_Application.g_edit_cookie_session_id IS NOT NULL THEN ... in developer mode ... ELSE ... not in developer mode ... END IF;
Pre-APEX 2.2 users have to use WWV_Flow.g_edit_cookie_session_id instead.