From the Execution Console you can select an entry point (for packages), enter the parameter input values, and choose various run options, such as profiling and directing the results to DBMS_OUTPUT.
The Execution Console helps you set various parameters for wrapping an anonymous block around a stored program so that you can execute it. If you generate an anonymous block, the Console assigns a file name to your block in the form: <Schema name>.<procedure name>.STB. If the anonymous block is for a packaged procedure, then the assigned name has an additional component—the entry point.
|
Note: If an error occurs when trying to run a generated code block (for example, due to a syntax error), the text is opened in the Output Window. |
Option | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameter | Name and type of each input parameter. | ||||||||||
Input |
Define input values for each parameter.
| ||||||||||
Load/Save | Click to load the input parameter values from an external file. | ||||||||||
Save | Click to save the input parameter values to an external file. | ||||||||||
Reset | Click to Reset changes to the parameter values. |
Command | Description | ||||||
---|---|---|---|---|---|---|---|
Auto-create test case after code execution |
When selected a test case is automatically created (when you click Execute) based on the parameter values (both input and output) currently displayed in the grid. | ||||||
Use Profiler |
Select to use the PL/SQL Profiler. Analyze the execution time and efficiency of your stored programs. Click (...) to open the Profiler Options dialog.
| ||||||
Direct results to Output |
| ||||||
Include exception block |
Select to populate the Exception block when the Stub tab is generated.
| ||||||
Commit changes after code execution |
Once the procedure has finished executing, do you want to COMMIT / ROLLBACK changes made by the procedure? | ||||||
Preview |
Show the code to be executed.
| ||||||
Execute |
Execute the PL/SQL code. If Use Profiler is selected, opens PL/SQL Profiler. |
The Code Test panel automates the process of testing PL/SQL programs. See also the module: Code Test.
Command | Description |
---|---|
Test Case | Select the test case to work on. |
In/Out | Display the in/out parameters and associated values for the selected test case. |
New | Create a test case. Open Test Case Properties |
Edit | Edit the selected test case. Open Test Case Properties |
Delete | Delete the selected test case. |
Test > Param | Upload the selected test case into the parameters. |
Param > Test | Update the selected test case with the current parameters. |
Manage | Clone and edit existing test cases, create new test cases and run multiple test cases at once. Open Code Test |
Run Test | Run the selected test case. The result of the test is displayed in the Test case status pane. |
Run All Tests | Run all code tests available for the current object. |
Instead of using the Execution Console, you can generate and preview a PL/SQL block to execute a stored program.
To generate a stub
From the PL/SQL Execution Console
|
Note: Different stubs are generated depending on the selected options. |
The DBMS_OUTPUT package is a standard package provided by Oracle specifically for the purpose of debugging stored programs.
Feature | Description |
---|---|
Insert a DBMS_OUTPUT.PUT_LINE statement in the code |
Edit Menu | Insert | DBMS_OUTPUT.PUT_LINE ('') |
Create a DBMS_OUTPUT.PUT_LINE statement for the selected variable in the editor. |
In the Code Editor
|
Capture output from DBMS_OUTPUT |
The SQL Navigator Output Window captures output from DBMS_OUTPUT. |
|
Note: The SYS schema owns this package. To view the procedure and parameter definitions of this package you can display it in the Code editor. |
Icon | Right Click | Keyboard Shortcut | Description |
---|---|---|---|
Cut | CTRL+X | Remove the selected text from the editing pane. Place on the Clipboard ready to Paste elsewhere. | |
Copy | CTRL+C | Alternative shortcut: CTRL+Insert | |
Paste | CTRL+V | Alternative shortcut: SHIFT+Insert | |
Nil | Select All | CTRL+A | Select all the text in the editing pane. This is usually followed by Cut or Copy. |
Auto Code Completion |
CTRL+ALT+A |
Turn on/off Auto Code Completion. (Auto Code Completion) Use SHIFT+Spacebar to force code completion. | |
Go to Definition |
CTRL+Enter |
Open the selected object in an appropriate editor: Visual Object Editors. Errors are sent to the Output Window. | |
Describe Object at Cursor |
CTRL+F3 |
Open Describe. As per Object | Describe. | |
Nil |
Toolbox | Next Page |
CTRL+ALT+N |
Scroll through the pages of the Code Editor toolbox. |
Nil | Toolbox | Previous Page | CTRL+ALT+P | |
File | New SQL Tab | CTRL+T | Open a new tab for a SQL script in the Code Editor. | |
File | Open File | CTRL+O | Open a file from Windows Explorer. | |
File | Save to File |
CTRL+S |
Save the file. This option is enabled once the file has a name. For an Untitlted tab, save the file using File | Save to File As first. | |
Object | New Stored Object | CTRL+N | Create a stored object. | |
Object | Open/Create Package Body | ALT+N | Create a body for an existing package or (object) type | |
Object | Execute | F9 | Opens PL/SQL Execution Console. | |
Object | Generate Execution Stub | SHIFT+F9 | Generate PL/SQL Stub. | |
Object | Save to Database | CTRL+S | Save the object to the database. | |
Edit | Duplicate Line | ALT+Y | ||
Edit | Format Text | CTRL+R | As per Tools Menu | Formatter Tools | Format Code | |
Edit | Comment Selection | ALT+F7 | Enclose the selected text in comments. | |
Edit | Uncomment Selection | CTRL+ALT+F7 | Remove comment markers from the selected text. | |
Edit | Jump to Matching Bracket | CTRL+] | Jump to matching Bracket. | |
Bookmarks | Toggle Bookmark | Ctrl+Shift+0...Ctrl+Shift+9 | Set a bookmark. The gutter margin in the Code Editor marks the bookmark. | |
Bookmarks | Go To Bookmark |
Ctrl+0...Ctrl+9 |
Go to the set bookmark. See also Edit | List Bookmarks ALT+B. | |
Split/Compare | Vertical Split |
SHIFT+ALT+F11 |
Adjust the layout of the editing pane. Select from the options to split the editing pane in half either horizontally or vertically. The content of the editing pane will be visible in both panes. You can scroll the panes independent of each other. | |
Split/Compare | Horizontal Split | SHIFT+F11 | ||
Split/Compare | No Split | SHIFT+CTRL+F11 | ||
Execute | Skip to Top |
SHIFT+F7 |
Execute SQL statement in Code Editor. As per Code Editor SQL | |
Execute | Skip to Previous | SHIFT+F8 | ||
Execute | Execute to End | F9 | ||
Execute | Execute Step | F8 | ||
Execute | Skip to Next | F10 | ||
Execute | Skip to Bottom | F11 |
For more information, see PL/SQL Debugger.
Icon | Right Click | Keyboard Shortcut |
---|---|---|
PL/SQL Debugger | CTRL+ALT+S | |
Toggle Breakpoint | F5 | |
Abort Debug Session | SHIFT+CTRL+F9 | |
Trace Into | F7 | |
Step Over | F8 | |
Add Watch | CTRL+F5 | |
Trace Out | SHIFT+F8 | |
Run to Cursor | F4 | |
Stop on Exception | CTRL+ALT+X | |
Auto Step Over | SHIFT+CTRL+F8 | |
Auto Trace Into | SHIFT+CTRL+F7 | |
Pause Auto Stepping | ALT+P |
Keyboard Shortcut | Description |
---|---|
CTRL+Home | Go to the top of the file |
CTRL+End | Go to the bottom of the file |
Home | Go to the beginning of the line |
End | Go to the end of the line |
CTRL+Right Arrow | Go to the next word |
CTRL+Left Arrow | Go to the previous word |
CTRL+I | Indent current line/selection |
CTRL+U | Unindent current line/Selection |
F6 | Go to the next tab |
SHIFT+F6 | Go to the previous tab |
Keyboard Shortcut | Description |
---|---|
ALT+n | Following a SQL query with many result tabs, go to the result tab numbered n. |
CTRL+F11 | Switch between the Query and Results page. |
ALT+Enter | Edit Cell Data. |
Icon | Tool Tip | Keyboard Shortcut | Description |
---|---|---|---|
New SQL Tab | CTRL+T | Open a new tab for a SQL script in the Code Editor. | |
New Stored Object | CTRL+N | Create a stored object. | |
File | Open File | CTRL+O | Open a file from Windows Explorer. | |
File | Save to File |
CTRL+S |
Save the file. This option is enabled once the file has a name. For an Untitlted tab, save the file using File | Save to File As first. | |
Auto Code Completion |
CTRL+ALT+A |
Turn on/off Auto Code Completion. (Auto Code Completion) Use SHIFT+Spacebar to force code completion. | |
Split/Compare | Vertical Split |
SHIFT+ALT+F11 |
Adjust the layout of the editing pane. Select from the options to split the editing pane in half either horizontally or vertically. The content of the editing pane will be visible in both panes. You can scroll the panes independent of each other. | |
Split/Compare | Horizontal Split | SHIFT+F11 | ||
Split/Compare | No Split | SHIFT+CTRL+F11 | ||
SQL History |
CTRL+ALT+R |
Recall SQL statement. Open in the Toolbox: History | |
PL/SQL Debugger | CTRL+ALT+S | Open in the Toolbox: PL/SQL Debugger | |
Execute | Skip to Top |
SHIFT+F7 |
Execute SQL statement in Code Editor. As per Code Editor SQL | |
Execute | Skip to Previous | SHIFT+F8 | ||
Execute | Execute to End | F9 | ||
Execute | Execute Step | F8 | ||
Execute | Skip to Next | F10 | ||
Execute | Skip to Bottom | F11 | ||
Object | Open/Create Package Body | ALT+N | Create a body for an existing package or (object) type | |
Save to Database | CTRL+S | Save the object to the database. | |
Execute Procedure / Function | F9 | Opens PL/SQL Execution Console. | |
Toggle Breakpoint | F5 | Add / Remove breakpoint on the selected line of code. | |
PL/SQL Debugger | CTRL+ALT+S | Open in the Toolbox: PL/SQL Debugger | |
Abort Debug Session | SHIFT+CTRL+F9 | For more information see PL/SQL Debugger. |
© ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center