PrOpHeT Posted January 31, 2006 Posted January 31, 2006 Is there a way to output debugging information in UDF's so I can see the state of variables in various places? Quote Life is a comedy to those who think; a tragedy to those who feel.
*Experts* Nerseus Posted February 1, 2006 *Experts* Posted February 1, 2006 I can't think of any direct way to do it. I know you can't put print statements in there. You also won't see the value of variables when using SQL Profiler. You could modify the function to write values to a table and look at the results after. You could also cut and past the function into Query Analyzer and look at the values there - not as a function, but executing each line one at a time. If you have the time, you could investigate setting up SQL Server to allow stepping through code. I've done it once, a long time ago, to step through a stored proc one line at a time. I don't know if you can step into functions though. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.