Reputation: 157
I am debugging a stored procedure in Sql Server, I can see the local variables in "Locals", I can add other variables in "Watches" (I have embedded a picture here with Sql Server in debug mode and different debug windows).
My question is: where can I see the result of the select statements during debugging? It is really helpful to see them as they are executed, more so when they read from temporary tables sometimes, which are local to that procedure.
Later edit:
I have followed the advice given below and am having this problem with XML viewer (please see attachment): "The XML page cannot be displayed"
Upvotes: 2
Views: 2902
Reputation: 175706
From View contents of table variables and temp tables in SSMS debugger
:
This won't be in immediately, but we are considering a feature similar to this for a future release.
And workaround (you need to add additional XML
variable for each temp table):
Declare @TableVar_xml xml
Set @TableVar_xml = (Select * from @TableVar for XML Auto, Elements xsinil);
Then I can look at the table variable contents using the XML viewer.
Upvotes: 1