RE: Debug anonymous block (Toad 10.6.0.42)

Gregory Liss <[email protected]>
Newsgroups gmane.comp.db.oracle.toad.free
Message-ID <C90E462F0168DA46BCC2DC6AD9059A5410C10CF8@ALVMBXW01.prod.quest.corp>
Toad doesn't have the ability to debug anonymous blocks.  You can only debug stored procedures/functions/packages.

Greg

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lovelady, Dennis E.
Sent: Thursday, May 03, 2012 09:39 AM
To: [email protected]
Subject: [toad] Debug anonymous block (Toad 10.6.0.42)

I am new to debugging with Toad, though I have been using Toad, Oracle and PL/SQL for years.



Using Toad 10.6.0.42 with no add-ons, I have converted sample loopproc into an anonymous block and saved it as loopproc.prc:



DECLARE

   tmpvar    NUMBER;

   tmpvar2   NUMBER;

   total     NUMBER;

BEGIN

   DBMS_DEBUG.SELF_CHECK;

   tmpvar := 0;

   tmpvar2 := 0;

   total := 0;



   FOR lcv IN 1 .. 100 LOOP

      total := 2 * total + 1 - tmpvar2;

      tmpvar2 := tmpvar;

      tmpvar := total;

   END LOOP;



   DBMS_OUTPUT.put_line('Total is ' || total); 

END ;



When I try to debug this, I am only able to set a breakpoint at the DECLARE statement.  When I press "Trace Into," the proc will stop at the DECLARE, but subsequent use of "Trace Into" runs to completion without stopping.  Is this expected behavior?  What might I be doing wrong?



By the way, I do not see a "Compile with Debug" option on my toolbar, nor under Commands in Customize Toolbar.  And I'm not certain of my access to DBMS_DEBUG, but given that the SELF_CHECK line runs without error - and the fact that I can set a breakpoint at DECLARE - and it does seem to break there - I think (?) that is not the issue.



Thanks,

Dennis



<BR>_____________________________________________________________

<FONT size=2><BR>

DTCC DISCLAIMER: This email and any files transmitted with it are

confidential and intended solely for the use of the individual or

entity to whom they are addressed. If you have received this email

in error, please notify us immediately and delete the email and any

attachments from your system. The recipient should check this email

and any attachments for the presence of viruses.  The company

accepts no liability for any damage caused by any virus transmitted

by this email.</FONT>


------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/toad/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/toad/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.