Home » SQL & PL/SQL » Client Tools » Debugging PL/SQL Web Forms in Toad (Toad 9.7.0.51 (running on Windows XP), Oracle 10.2.0.2 (running on Solaris))
Debugging PL/SQL Web Forms in Toad [message #357074] Mon, 03 November 2008 15:25 Go to next message
gossep
Messages: 2
Registered: November 2008
Junior Member
Greetings.

I am doing some work in Banner (the SCT Sungard ERP for educational institutions) and am attempting to use TOAD to debug a PL/SQL web form.

Everything that I've come across thus far indicates that I need to enable debugging, attach the package in TOAD to the external session using Debug > Attach External Session, and then call the web package (http://*****:7778/pls/banqa/bzckschd.p_get_crse_unsec).

Here are the steps I have followed thus far:

1. Execute the following anonymous block via a SQL window in TOAD to get the debug session ready (I don't have SQL *Plus installed, so I did it from a SQL window instead)

DECLARE
  id VARCHAR2(255);
BEGIN
  id := DBMS_DEBUG.INITIALIZE('PABLO_TEST_DEBUG');
  DBMS_DEBUG.DEBUG_ON;
END;


2. Load the package/procedure I want to debug into a pl/sql window in TOAD and set a breakpoint.

3. Select 'Debug > Attach To External Session', and enter 'PABLO_TEST_DEBUG', which I earlier defined as the debug session id.

At this point Toad just spun its wheels for about five minutes, and then a probe query timeout error was received.

On a subsequent attempt executing the anonymous block simply resulted in the query executing for over 20 minutes, at which point I canceled execution.

I'm using TOAD for my development environment, and it's essential that I can get decent debug information. Does anyone have any information that they could share as to what I'm missing here?

Given the depth and complexity of the system I am working in (Banner from SCT Sungard), it is incredibly inefficient to have to insert calls to htp.p to find out where the problem is. This has, at times, resulted in a few hours of testing to track down a problem that with a proper debugging environment would be identified almost instantly.

If anyone could give me any advice or point me to some resources on how to enable debugging within TOAD of pl/sql packages/procedures/functions that are called via the web I would be very, very appreciative.

Thanks,

Pablo
Re: Debugging PL/SQL Web Forms in Toad [message #376617 is a reply to message #357074] Thu, 18 December 2008 01:00 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
"I have a developer trying to debug using TOAD. He is getting a 'probe timeout' error. The debug package is loaded correctly. What should I look at to fix the issue?"

Answer is at http://asktoad.com/DWiki/doku.php/faq/answers/procedure_editor
Re: Debugging PL/SQL Web Forms in Toad [message #378927 is a reply to message #376617] Fri, 02 January 2009 12:59 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
To do simple debugging for pl/sql gateway code from Toad you can do this. It also allows you to single step through the code without issue.
DECLARE
   nm          OWA.vc_arr;
   vl          OWA.vc_arr;
   l_thepage   HTP.htbuf_arr;
   l_lines     NUMBER        DEFAULT 99999999;
BEGIN
   -- initialize cgi env with anything your pl/sql needs
   nm (1)                         := 'REMOTE_ADDR';
   vl (1)                         := '1.2.3.4';
--   nm (2)                         := 'SCRIPT_NAME';
--   vl (2)                         := '/pls/banqa';
--   nm (3)                         := 'SCRIPT_PREFIX';
--   vl (3)                         := '/pls';
   OWA.init_cgi_env (nm.COUNT, nm, vl);

   -- call your web code
   bzckschd.p_get_crse_unsec (...);
   
   
   OWA.get_page (l_thepage, l_lines);

   -- print HTTP buffer using dbms_output
   FOR i IN 1 .. l_lines
   LOOP
      DBMS_OUTPUT.put_line (l_thepage (i));
   END LOOP;
END;
/




Re: Debugging PL/SQL Web Forms in Toad [message #455732 is a reply to message #357074] Wed, 12 May 2010 13:14 Go to previous messageGo to next message
pblack777
Messages: 2
Registered: May 2010
Junior Member
I'm having the exact same problem trying to debug Banner PL/SQL web forms with TOAD debugger. I've also been using htp.p statments wich is reall old school. Does anyone have a solution?
Re: Debugging PL/SQL Web Forms in Toad [message #455735 is a reply to message #455732] Wed, 12 May 2010 13:18 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: Debugging PL/SQL Web Forms in Toad [message #455739 is a reply to message #455735] Wed, 12 May 2010 13:23 Go to previous messageGo to next message
pblack777
Messages: 2
Registered: May 2010
Junior Member
I've never posted here before. It would be real helpful if you were more specific and had some actual useful suggestions.
Re: Debugging PL/SQL Web Forms in Toad [message #455743 is a reply to message #455739] Wed, 12 May 2010 13:29 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
You have essentially said -
my problem is like this other guy's problem
tell me how to fix it.

We don't know what you have.
We don't know what you do.
We don't know what you see.
It is really, really, REALLY difficult to fix a problem that can not be seen.
use COPY & PASTE so we can see what you do & how Oracle responds.

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

Previous Topic: spool only time and stats
Next Topic: Spooling Output in Windows
Goto Forum:
  


Current Time: Sat Dec 10 15:00:31 CST 2016

Total time taken to generate the page: 0.07272 seconds