Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wwv_flow.debug() vs apex_debug.message()

Tags:

oracle-apex

I've written a custom pl sql function for doing authorization. I know my function is being called by Apex's authorization hook. But I need to debug what's going on inside my authz function.

I've successfully used wwv_flow.debug() before in debugging ajax calls I was making to stored procs. I could see my messages in apex's debug window.

But while debugging my authorization function I cannot see my debug messages. I'm trying to use both wwv_flow.debug() and apex_debug.message()

This brings me to 2 questions:

  1. What's the difference between wwv_flow.debug() and apex_debug.message()? When should each be used?

  2. Any ideas on why my debug messages aren't showing up during the call to my authorization function?

Thanks.

UPDATE: turns out my messages weren't showning, because the authorization was being cached and my pl/sql code wasn't being called, so I solved question #2. And I can see both my wwv_flow.debug() and apex_debug.messages(). Question #1 still stands though.

like image 374
lostdorje Avatar asked Feb 25 '13 12:02

lostdorje


1 Answers

wwv_flow.debug is an older version, still supported for backward compatibility.

apex_debug.message is a more modern version and supports substitution strings e.g.

apex_debug.message('the value of %s + %s equals %s', 3, 5, 'eight');

That example is from the APEX 4.2 docs

like image 165
Tony Andrews Avatar answered Oct 19 '22 02:10

Tony Andrews