Debug PL/SQL Code

How will you debug PL/SQL Code?

Questions by chinnuchaitu   answers by chinnuchaitu

Showing Answers 1 - 16 of 16 Answers

soujibb

  • Aug 20th, 2008
 

1. We can debug using toad, pl/sql developer tools. Debug option will be there in these tools. before debugging the package or anything, enable the dbms_output option.

or

2. Using DBMS_DEBUG Package also we can debug the pl/sql code.




  Was this answer useful?  Yes

Mad Hatter

  • Nov 4th, 2008
 

You can use variouse tools like Toad to debug PL/SQL package
Other way is to implement your own debug technic, like printing bms_output during the code execution (cons - you will get output only when package finished)
You can create debug package with pragma autonomos_transaction to log all your steps.
Also, if you need to check/tune your package performance, there is Oracle DBMS_PROFILER package. It was introduced in Oracle8i to allow developers to profile the run-time behaviour of PL/SQL code, making it easier to identify performance bottlenecks which can then be investigated more closely.

  Was this answer useful?  Yes

The Best way to debug is by using an AUTONOMOUS TRANSACTION. Create a dummy table and insert into the table using the AT. This wont affect the main code, but one could know which part of the code the execution has reached while the program is running itself.

geek.hari

  • Dec 14th, 2009
 

One conventional and popular method of debugging a pl/sql code is through printing the program execution path using a printable statement. For this you have to enable the output mode using the command :

SET SERVEROUTPUT ON [SIZE 20000]
and then printing the  debug messages using the package DBMS_OUTPUT.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions