The Toad for Oracle Script Debugger can only debug SQL scripts. It cannot debug or does not support debugging PL/SQL procedures, packages, called procedures, anonymous blocks, etc.
There are actually some SQL scripts that is good to test on at the path below. Please go there and load some of the scripts in your Editor and use the Script Debugger on it.
C:\Documents and Settings\<YOUR_USER>\Application Data\Quest Software\Toad for Oracle\10.6\ScriptMgr\DBA
You can load the 'aq.sql' file as a sample to test on in Editor.
Here are the contents of the 'aq.sql' file:
set echo off
set feedback off
set linesize 512
prompt
prompt All AQ Tables in Database
prompt
SELECT *
FROM DBA_QUEUE_TABLES
ORDER BY OWNER, QUEUE_TABLE;
prompt
prompt All Advanced Queues in Database
prompt
SELECT OWNER, QUEUE_TABLE, NAME, QID, QUEUE_TYPE, MAX_RETRIES, RETRY_DELAY, ENQUEUE_ENABLED, DEQUEUE_ENABLED, RETENTION, USER_COMMENT
FROM DBA_QUEUES
ORDER BY OWNER, QUEUE_TABLE, NAME;
Steps to debug:
1) Set one or two Breakpoints.
2) Click the “Trace Into” icon ONCE.
3) Click the “Trace Out” icon and it will stop at the first Breakpoint.
4) Click the “Trace Out” icon again and it will stop at the next Breakpoint.
5) Click the “Trace Out” icon again, and when there are no more Breakpoints, it will continue to the end of the script.
OR
If you just want to Trace / See each SQL line execution, which means there is no need to set Breakpoints (because you’re going through each line), just keep on clicking the “Trace Into” icon until it finishes the whole script.
The Output, Grid 1, Grid 2, etc. tabs will show the results.