Toad World® Forums

Endless loop in Debug Block


#1

PROCEDURE save_outarg_values

IS

BEGIN

/* In case there are no scalar OUT arguments. */

NULL;

DBMS_OUTPUT.PUT_LINE ('PS_APPLICATION: ’ || i_PS_APPLICATION);

DBMS_OUTPUT.PUT_LINE ('PS_COMPONENT: ’ || i_PS_COMPONENT);

DBMS_OUTPUT.PUT_LINE ('PS_INSTANCEID: ’ || i_PS_INSTANCEID);

DBMS_OUTPUT.PUT_LINE ('PS_THREADID: ’ || i_PS_THREADID);

DECLARE

l_index PLS_INTEGER := i_PS_MESSAGEPARAMS.FIRST;

BEGIN

WHILE (l_index IS NOT NULL)

LOOP

DBMS_OUTPUT.

PUT_LINE (

'PS_MESSAGEPARAMS index ’

|| l_index

|| ': ’

|| i_PS_MESSAGEPARAMS (l_index));

END LOOP;

END;

DBMS_OUTPUT.

PUT_LINE ('PS_BUSINESSCASEID: ’ || i_PS_BUSINESSCASEID);

DBMS_OUTPUT.

PUT_LINE ('PS_CORRELATIONID: ’ || i_PS_CORRELATIONID);

DBMS_OUTPUT.PUT_LINE ('PN_MESSAGEKEY: ’ || i_PN_MESSAGEKEY);

DBMS_OUTPUT.PUT_LINE ('PN_SEVERITY: ’ || i_PN_SEVERITY);

DBMS_OUTPUT.PUT_LINE ('PS_USER: ’ || i_PS_USER);

END save_outarg_values;

Hi CodeTester-Team

I just created a debug-block within the Test-Builder and got the following piece of code for sub-procedure save_outarg_values. I think this loop within the nested declare block to iterate through nested table i_PS_MESSAGEPARAMS is never ending. Maybe it would be a good idea to include something to set the next iteration value inside the WHILE loop :wink:

Regards
Daniel


#2

Thanks, Daniel. This is fixed in CT2.

SF


#3

Hm, seems like I really have to use the new CT2. Unfortunately, I wasn’t able to use the previous Beta since it was already expired at this time. Now I’m looking forward to the next release :slight_smile:

Cheers
Daniel