I am running into an issue with the debugger in SQL Anywhere 12 Build 3840.

We have created a stored procedure that gets called on connection to the database. Now back in the ASA6 days, we didn't have events, so we created a procedure called pa.prloginenvironment. PA being our public user with dba privileges that is used to create all objects in the database. We then set the login procedure option to pa.prloginenvironment. For the record, pa.prloginenvironment calls the "sp login environment" procedure, so we're handling that as well.

We're running into an error in this procedure, so I'm wanting to put some stops into the procedure and watch it in the debugger.

I turn the debugger option on, and select that I want to debug all users.

I literally have about 12 stops set up in the procedure. Including one at the very first line after the begin statement. It's a create variable command that creates a connection level variable that is used throughout that databases connection.

I know the procedure is being called on connection, because there are some messages that we are sending to the console. These are getting generated. But these messages that are getting sent to the console are after the breakpoints.

Anybody have any thoughts on why the procedure wouldn't stop at these breakpoints?

Any ideas would be greatly appreciated.

Thanks!!

Jeff Gibson
Intercept Solutions - SAP Sybase SQL Anywhere OEM Partner
Nashville, TN

asked 29 Jan '14, 17:01

Jeff%20Gibson's gravatar image

Jeff Gibson
1.4k294654
accept rate: 21%


I don't believe that you can use the SP debugger to debug a login procedure directly... because the debugger itself doesn't setup its debugging hooks until after the login procedure has completed. I.e. until after the connection has successfully been created (and to be 'successful' the login procedure must complete without generating an exeception).

To debug your pa.prloginenvironment procedure you will need to call it explicitly after you have logged into the database.

permanent link

answered 29 Jan '14, 17:22

Mark%20Culp's gravatar image

Mark Culp
23.4k9132275
accept rate: 40%

I see what you're saying Mark.

Let me work that angle and see if I can determine what is going on with the procedure when I fire it directly.

Jeff Gibson

(29 Jan '14, 18:28) Jeff Gibson
Replies hidden

That was it Mark. I'm able to dig through the debugger now just like I need. Thanks for the heads up on this.

Jeff Gibson

(30 Jan '14, 18:07) Jeff Gibson
Comment Text Removed
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×415
×102

question asked: 29 Jan '14, 17:01

question was seen: 550 times

last updated: 30 Jan '14, 18:07