5

I am using SQL Developer to debug code like below, the output result will be shown on debug dialog ONLY after I finish all stored procedure. Do I need to turn on some configurations ?

Thanks

 FOR j IN REVERSE 1..i LOOP
     DBMS_OUTPUT.PUT_LINE(emp_tab(j).first_name);
  END LOOP;

log

Connecting to the database hr.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '192.168.1.4', '53475' )
Debugger accepted connection from database on port 53475.
Source breakpoint occurred at line 24 of EMP_LIST.pls.
Source breakpoint occurred at line 24 of EMP_LIST.pls.
Source breakpoint occurred at line 24 of EMP_LIST.pls.
Source breakpoint occurred at line 24 of EMP_LIST.pls.
Source breakpoint occurred at line 24 of EMP_LIST.pls.
Source breakpoint occurred at line 24 of EMP_LIST.pls.
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.DISCONNECT()
Shelli
Hermann
David
Mozhe
Sundar
Ellen
Process exited.
Disconnecting from the database hr.
Debugger disconnected from database.

1 Answer 1

7

If you are using DBMS_OUTPUT to debug, you won't see any output until the process completes. That's the way DBMS_OUTPUT works.

It appears you are successfully using the SQL Developer debugger, however, which is a much more effective way of debugging a stored procedure. You are apparently setting breakpoints so you can examine the values of variables at those breakpoints. There is no need to print the values.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.