# SCRIPT DEBUGGER

**URL:** <https://forums.toadworld.com/t/script-debugger/39002>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [January 30, 2017, 2:37am UTC](https://forums.toadworld.com/t/script-debugger/39002 "2017-01-30T02:37:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wnocella](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@wnocella](https://forums.toadworld.com/u/wnocella)\
**Post date:** [January 30, 2017, 2:37am UTC](https://forums.toadworld.com/t/script-debugger/39002/1 "2017-01-30T02:37:12Z")

</div>

Hi

I need debugging anonymous blocks in Toad fo Oracle 12.8

In Debug Menu I enabled SCRIPT DEBUGGER but debug finished immediately.

Suggestions?

Thanks in advance

Stephen

---

<div class="post-metadata">

**Author:** ![fangmeier](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@fangmeier](https://forums.toadworld.com/u/fangmeier)\
**Post date:** [March 3, 2017, 6:22am UTC](https://forums.toadworld.com/t/script-debugger/39002/2 "2017-03-03T06:22:28Z")

</div>

An anonymous block looks like this:

* * *

DECLARE

...

BEGIN

...

END;

/

* * *

Change it to this:

* * *

CREATE OR REPLACE PROCEDURE anonymous\_block AS

...

BEGIN

...

END;

/

ALTER PROCEDURE anonymous\_block COMPILE DEBUG;

* * *

Now you may set breakpoints in the procedure and debug it like any other procedure, function or package. When done, drop the procedure or change the first line to DECLARE.

> [@](#):
>
> Hi
> 
> I need debugging anonymous blocks in Toad fo Oracle 12.8
> 
> In Debug Menu I enabled SCRIPT DEBUGGER but debug finished immediately.
> 
> Suggestions?
> 
> Thanks in advance
> 
> Stephen

---

<div class="post-metadata">

**Author:** ![GTDG](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gtdg/32/140_2.png) [@GTDG](https://forums.toadworld.com/u/GTDG)\
**Post date:** [March 3, 2017, 6:33am UTC](https://forums.toadworld.com/t/script-debugger/39002/3 "2017-03-03T06:33:57Z")

</div>

The reason you’re seeing that behavior is that an anonymous block is technically just a single statement (at least in the eyes of Oracle) and there is technically no way to step into it.

---

<div class="post-metadata">

**Author:** ![wnocella](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@wnocella](https://forums.toadworld.com/u/wnocella)\
**Post date:** [March 3, 2017, 7:25am UTC](https://forums.toadworld.com/t/script-debugger/39002/4 "2017-03-03T07:25:09Z")

</div>

I’m in a Production Environment . I can’t create/replace a procedure.

I wanna debug script to avoid dbms\_output.put\_line…
