Pages

Monday, 14 March 2016

Oracle Forms Debugging: Using the “DEBUG_MESSAGES=YES” runtime option - Handling "Please Acknowledge" message

Oracle Forms Debugging: Using the “DEBUG_MESSAGES=YES” runtime option - Handling "Please Acknowledge" message

“DEBUG_MESSAGES=YES” is a “quick and dirty” technique for pinpointing code problems. This causes a message to automatically display to let you know each trigger as it executes. Once you encounter the runtime error, you will know the last trigger that fired and should be able to trace through the code from that point. For anyone that was around in the SQL*Forms 3.0 days, this was the default behavior when running a form in debug mode.

To use this option from the Form Builder, check the “debug_messages” option on the runtime tab after choosing Tools -> preferences from the menu. From the command line, simply add the “debug_messages=yes” option. 

If you are using an icon in Windows to start your form, add the option to the shortcut command. It would look something like this for Windows platforms:

c:\orant\bin\ifrun60.exe module=myform userid=scott/tiger debug_messages=yes

On Unix:
f60runm module=myform userid=scott/tiger debug_messages=yes

The major disadvantage of using this technique is that you have to acknowledge every message as each trigger executes, which can be very annoying. You will keep getting "Please acknowledge message" prompt each time whenever a new trigger is encountered. Although it shows the triggers that fire, it does not show program units that execute, and there is no way to display the values of variables. It can also cause the same focus problems and program flow interruption that you see with the “MESSAGE” built-in. However, this method is useful if you have no idea which trigger is causing the problem; once you have narrowed down the scope, other troubleshooting techniques would be more appropriate.