Mentor SAP

 

To Debug Database Procedures

  1. In the SAP HANA tools/ SAP HANA studio, open the SAP HANA development perspective. You can use menu item Window -> Open Perspective -> Other .. or choose the Open Perspective button in the toolbar. Choose SAP HANA Development in either case.
  2. In the Project Explorer in the navigation frame on the left, open the context menu and choose New -> Other….in the dialog window, open folder SAP HANA -> Application Development, choose item XS Project and press Next.
  3. Enter a Project Name, e.g. debug and press next.
  4. In step share project, press add workspace, choose your SAP HANA system and press Finish.
  5. Back in step Share project, unflag Add Project folder as Subpackage.
  6. Press Browse …, choose a repository package, press OK and then Next.
  7. In step create objects, unflag all checkboxes in the access objects frame and leave the field in the frame Common Objects empty.
  8. Press Finish.
  9. Locate the procedure you want to debug in your database schema by opening the project, sub-folder SAP HANA system library -> Catalog.
  10. Open the procedure in an editor window by double-clicking it.
  11. In the left-most column of the editor window, double-click on the lines where you want to set breakpoints.
  12. Open the debug perspective. You can use menu item Window -> Open perspective -> other ..or press the open perspective button in the toolbar. Choose Debug in either case.
  13. Open the menu of the debug button in the toolbar and choose Debug Configurations
  14. Choose SAP HANA stored procedures, then open the context menu and choose New.
  15. Enter a name for the debug configuration
  16. Choose option Procedure to debug: and catalog schemas in the corresponding dropdown list.
  17. Press the browse …button navigate to your database schema and the procedure you want to debug, choose it and press ok.
  18. Press Debug.

The system starts a debugging session and calls the procedure chosen in the debug configuration. Execute stops at the first breakpoint.

 

You can resume execution until the next breakpoint, terminate the debugging session, inspect the variables values, add breakpoints, and more.