This is the first time I have really played with the "Apply Auto Debugger" capability in TOAD. I always just manually added a few DBMS_OUTPUT commands here and there as needed, but this tool is really nice most of the time. I just started creating a new Package with several stubbed out Procedures/Functions. I started adding some code and something has confused the Apply Auto Debugger. Here is the Package Body without the Apply Auto Debugger statements:
IE_DATA_MAINT.sql (11.3 KB)
It compiles without issue, so I assume my syntax is correct for the stubs and portion I have coded. Here is the code with the Auto Debugging:
IE_DATA_MAINT Debugging.sql (19.4 KB)
This code will not compile because of lines 340-346 '{Toad_198259455_11}' which attempt to write out variables defined in the procedure immediately above. There is then a simple setting of a variable followed by '{Toad_198259455_12}' segment which correctly uses the variables in scope for the procedure. Initially I thought it was because the Procedure did not have any parameters associated, so I added a dummy param, did a Remove Debugging then Added it back and got the same result.
I just went to compile with the lines mentioned above removed and discovered the issue is more wide spread. Line 140 [4] and 219 [7] also include variables from the previous code block. It seems to be over zealous on the initial debugging segment in each Proc/Funct. I guess I did not initially see that as all blocks were just stubs and had the same dummy variables defined.