지금 지원 담당자와 채팅
지원 담당자와 채팅

SQL Navigator for Oracle 7.5 - Release Notes

PL/SQL Debugger

Note: Show/Hide PL/SQL Debugger in the Toolbox from the Code Editor toolbar.

All the tools and features for debugging stored programs can be found inside the PL/SQL Debugger window.

Use the debugger to perform the following functions:

  • Run to the end or to the next breakpoint.
  • Step over code.
  • Step into code, when other procedures are called from the current line.
  • Display the execution stack.
  • View and modify any variable value.
  • Set watch variables.
  • Set and remove breakpoint on the fly as the code is executing, except in an anonymous block.
  • Stop a running procedure.
  • Set an option to either stop execution if an exception occurs, or ignore exceptions.

Requirements

Area Requirement

Oracle server connection

Debugging is functional only when you are connected to an Oracle server via a SQL*Net connection. If you are using a local database, such as Personal Oracle, use the loopback SQL*Net connection to perform interactive debugging.

Oracle Permissions

create session

alter session

Debug on/off

To watch, evaluate, or modify variables of a stored program:

Compile the program with debug information: Session Menu | Include Debug Info.

Successful compile

If the procedure fails to compile, it is displayed in red in DB Navigator. It cannot be debugged.

 

Debug

Feature Description

Locals tab

Use the Locals tab to test the effect of different variable values in your procedure.

Example Scenario: Your procedure performs a computation. Start the procedure, enter a starting value and watch how the procedure handles the result. If you want to see a "what if" computation, enter a new value for the variable in the Locals tab and repeat the procedure.

Note:

  • If you see an error such as "Not compiled with debug info" instead of the variable value, you need to recompile the procedure with the Debug information and re-execute it in the debugger to see the value of variables. See Session Menu | Include Debug Info for more information.
  • The values in the Locals tab are only populated when the code is running.
  • The values of the input parameters cannot be modified in the Locals tab.
  • When you evaluate a variable in a current breakpoint, remember that the current breakpoint has not yet been executed.

REF CURSOR type variables

When evaluating/watching a variable of REF CURSOR type, its value is displayed in the following format:

flags:FFF, rowcount:RRR.

RRR determines the number of records fetched so far by the examined cursor.

FFF is a combination of cursor status flags:

%ISOPEN

%FOUND

%NOTFOUND

If the user enters the watched variable names as C1%NOTFOUND, C1%FOUND, C1%ISOPEN, C1%ROWCOUNT, the displayed value is the same as would result from watching the cursor itself. (C1 is the name of the cursor)

Watches and Breakpoints

You can set breakpoints and watches at any time before or during a debug session. You do not have to recompile your program after you set breakpoints or watches.

Add/remove breakpoints by clicking in the gutter margin left of the code. For more information, see Edit, Compile And Execute. There is also an icon on the toolbar to toggle on/off breakpoints. For more information, see Code Editor PL/SQL.

When execution of a procedure is paused at a breakpoint, you can evaluate or modify any scalar variable within procedure code. If you change the value of a variable, you can confirm the new value of the scalar variable by evaluating the variable again.

Note:

  • You can open multiple editors and set breakpoints in several stored programs simultaneously.
  • When you evaluate a variable in a current breakpoint, remember that the current breakpoint has not yet been executed.
  • Variable values in the "watch" window are updated only at the breakpoint, so strategically place breakpoints after the watch variable.
  • Increasing the number of variables in the watch list may result in slower debugger performance.

 

Related Topics

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택