I am adding some debug code to a stored procedure that creates XML message. This stored procedure is called from many other stored procedures, and I want to see what stored procedures are calling that stored procedure that creates the XML.
Is there a system stored procedure that can provide this information?
For example, SP1 calls SP_XML. IN SP_XML, add code to tell me that SP1 is the caller.
Not sure if there is system stored procedure or a way to tell me this, even better would be if I can see the whole tree of stored procedure being called.