Wednesday, March 8, 2017

How to debug Oracle queries, procedures and functions in Navicat’s debugger? (Windows & Linux)


Navicat for Oracle Debugger can help you with the testing and debugging of SQL functions, procedures, queries, etc.


You can open the design form of a function to start the debugger.


Set the breakpoints to start debugging. Click “Save as Debug” button in the toolbar. 


Click “Debug” button in the toolbar, a parameter box will pop up if your function or procedure requires you to input parameters.


Once the debugger reaches a breakpoint, it will stop the program execution and highlight the line where a breakpoint was reached in the Code Window (the red arrow).

You can use the buttons inside the red rectangle to control the debugger.

Useful views to help breakdown the information:
Call Stack (the blue rectangle) – displays the function or procedure calls of the current line.
Watch List (the green rectangle) – displays information about the variables being watched.
Smart Data (the purple rectangle) – displays information about the variables associated with the breakpoints.
Breakpoints (the green arrow) – displays all the breakpoints.

You can simply right-click the highlighted code to add a variable to the Watch List.


Bottom tabs:
Log: shows the message log
DBMS: shows the output of the function or procedure.

No comments:

Post a Comment