Folks could someone please share the ways to debug a Stored Proc ? It was an interview question where the interviewer was asking the way to debug a SP without using tools. Finally he said like, in Oracle, there is something in a package which gives a way to debug. I didn’t understood neither he completely explained 🙁
Share
well, if you are on SSMS, the easiest way would be to use the print function. Each line you want to see if ti was “reached”, just add a print ‘line X’ and check your messages tab.
If you are not on SSMS, you can create a global temp table (create table ##debug_table….) and add insert statments in your proc folowing the same logic as the prints.
All of these “solutions” are considering that you have permisison to update the proc, of course. If yo udont I really dont see how it could be done.