How to Open a Trigger Body in Code Editor

How to Open a Trigger Body in Code Editor

<p>Debugging Triggers in SQL Navigator 6.3</p><p>One of the regressions of SQL Navigator v6.0-6.2 compared to v5.5 was inability to debug triggers. The reason was that PL/SQL Debugger starting with v6.0 is incorporated into Code Editor, which doesn’t have the ability to edit triggers. To solve the problem, v6.3 introduces a new feature into Code Editor: Edit Body. This function allows the user to open and edit in Code Editor the body of a trigger, set breakpoints and therefore trace into it using the debugger. This feature is intermediate before introducing a full-featured Trigger Editor as part of Code Editor in a future version and is explained below.</p><p>How to open a trigger body in Code Editor</p><p>To open a trigger body, use the new Edit Body right-click menu option in DB Explorer:</p><p>This will create a new tab and load the trigger’s body in it: You can modify the body and save it to the database if you wish. To change other properties of the trigger, such as timing, use Trigger Editor like you did before (but you need to close the body in Code Editor first).</p><p>How to debug a trigger</p><p>To debug the body you just opened, you have to set a breakpoint/breakpoints first by clicking the gutter, like for other types of objects: To start debugging, you need to create either a PL/SQL block or a stored procedure performing the DML statement that fires the trigger:</p><p>Note: Remember to include a COMMIT or ROLLBACK statement to unlock the rows modified by the statement otherwise you may lock your object and cause SQL Navigator to freeze.</p><p>When the statement is executed, given that it fires the trigger correctly and PL/SQL Debugger is enabled, the execution will stop at the breakpoint: Now you can trace through the trigger logic normally using F8 (Step Over), F7 (Trace Into), set additional breakpoints and watch local variables:</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us