Toad World® Forums

Debug Script


#1

Hi,

Is there a way to create “debug scripts”?
Inline with Test Driven Development, I created my test cases first and started to work on the implementation of the actual code. Most of the time the Test Viewer doesn’t smile at me, so I create a debug script which I can use in my Debugger to track down why the program took a left turn when I expected it to go right.
So I do a lot of copy and paste from the Test Builder to my Debugger. All the test cases are stored in the database, is there an easy way to generate these scripts for me?

Thank you for your suggestions.
Alex


#2

Alex,

When you say debug script, do you mean a pl/sql block that will run the program with the input values etc. that you specified, but outside of Code Tester?

SF


#3

If that is indeed what you’re talking about, you can get this from the Test Editor and copy directly to your IDE of choice’s Anon Block Debug Init, assuming your IDE supports that.

Toad and SQL Nav do support this :slight_smile: This would make for a sensible product integration point in the near future. And vice versa, take debug script to create test case in Code Tester.

Jeff


#4

Yes, that is what I am talking about. An anonymous block with the input values and what not.
I don’t see how the Test Editor fits the bill. Are you talking about the Test Code which is generated? Taking out one test case (the procedure that performs the actual test) is still pretty cumbersome. There is a lot of “overhead” that you need to take along aswell, like the assertion routines.

Thanks, Alex


#5

You’re right of course, it doesn’t get us there all the way yet. That’s what I get for talking off the top of my head versus really ‘thinking’ first :slight_smile:

For now I copy & paste the variable assignments from the test outcome program call section from the Test Editor.

if i have more than 1 or 2 inputs, its still worth the time, esp if they are not simple text scalars.

I think we have a definite winner for possible Code Tester & IDE Debugger or even profiler integration.


#6

It is a good starting point though, especially with a lot of input parameters.

Thank for your suggestions.

Alex
(btw. no more QuteRox?)


#7

I liked ‘QuteROX’ but we’re no longer ‘QUTE’ and I already had the ToadWorld hillbilly handle.


#8

Alex,

Are you really interested in a separate debug script? With remote debugging you can debug your code without leaving Code Tester or building your own test script. In order to remote debug you’ll need an IDE which supports JDWP i.e. TOAD for Oracle (only editions that include debugging functionality) or SQL Developer. It takes just a few steps to implement. Have a look at http://jornica.blogspot.com/2007/06/remote-debugging-code-tester.html . By the way, setting up remote debugging is easier than learning Code Tester.

With kind regards,

Jornica


#9

By the way, setting up remote debugging is easier than learning Code Tester.
OUCH!

That hurts :slight_smile: I should know b/c I’ve spent a lot of time on both, although with DBMS_DEBUG, not JDWP…the External Debug concept is extremely simple I agree. The practice of implementing it natively in your applications in such a way that it just WORKS for any developer is a bit more tricky. Maybe JDWP solves this natively? I must say so that my initial experience with JDWP is not so…good. Thankfully my Toad lets me use either Debug API.

HOWEVER, we hear your pain, and are working tremendously hard to make v1.6 much more intuitive. This will be a continuing process and we depend on the feedback on these user forums to improve the technology and the overall experience.

Are you participating in our beta program?

Regards,
Jeff Smith
Product Manager, Quest Code Tester for Oracle