SQL Anywhere has had a stored procedure and trigger debugger since Version 6 was released in 1998. AFAIK there is no debug API, nor has there been many (any?) requests for it.
You get the debugger via Sybase Central; here's how, using Version 11:
(1) Open Sybase Central and connect to a database.
The "Mode" item will appear in the menu bar.
(2) Click on Mode - Debug.
The "Specify User to Debug" dialog box will appear.
(3) Click OK.
Three "Debugger Details" panes will appear.
(4) Open the source for a procedure or trigger or whatever in the top right pane.
(5) Right-mouse-click on the grey vertical bar to the left of a statement where you want to put a breakpoint... click on Insert Breakpoint.
(6) Run your application, or commands in dbisql, etc., to cause the procedure to be called.
(7) Switch back to Sybase Central... a yellow arrow will appear at the breakpoint.
And so on...
answered 29 Jan '10, 11:03