When debugging a SQL module, to watch the result of DBMS_OUTPUT within a FOR loop is not possible.
For z in XY loop
dbms_output.put_line( AB || ' ' || XY || ' ' || BC);
End loop;
You will get the error message: "Undeclared identifier on the for array name".
The debugger information that is shown by the Toad debugger is given by the Oracle debugger information. Unfortunately, the information to monitor the output of the variable XY within the loop is not delivered by the Oracle Debugger. This is a lack of information from Oracle Debugger.
WORKAROUND:
1. Added a new expression named XY(1) in the Watch window.
2. Change the 'Repeat Count' to, for example, 10 in the 'Watch Properties' by double clicking on the XY(1) in the Watch window.
While running through the loop, every time there is an additional entry in XY(1) this will additionally be shown in the Watch window.
STATUS:
Enhancement request QCM 33061 has been submitted to Development for consideration in a future release of Toad.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center