Previous Thread:   [NonSerialized]

1/23/2006 2:27:06 PM    Call stack
I was trying to get a CallStack (i.e. list of methods called on a type)  
  
while debugging a sql script with CLR type.  I want to see all the methods  
  
that were called on the type before the break point in the script.  I could  
  
not figure out how to do that.  Any ideas?  
  
--  
  
William Stacey [MVP]



1/23/2006 2:41:20 PM    Re: Call stack
Hi William,  
  
You can see the call stack in VS2005 by clicking Debug from the top-level  
  
toolbar, then click Windows, then Call Stack.  
  
--  
  
Adam Machanic  
  
Pro SQL Server 2005, available now  
  
http://www.apress.com/book/bookDisplay.html?bID=457  
  
--  
  
"William Stacey [MVP]" <william.stacey@gmail.com> wrote in message  
  
news:Osy%23CMFIGHA.1676@TK2MSFTNGP09.phx.gbl...

1/23/2006 2:55:19 PM    Re: Call stack
I should have been more specific.  I can see the window, but what I want is  
  
the stack history:  
  
For example below.  If I set a break point on last line, I want the see the  
  
call stack on t1 for all the methods that where called on t1.  I don't seem  
  
to get that.  Should I looking for something else?  
  
declare @tl TList  
  
set @tl = TList::Parse("binary,0xaaaa")  
  
set @tl.AddItem(2)  
  
select @tl.Count  
  
--  
  
William Stacey [MVP]  
  
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in message  
  
news:ejhaBUFIGHA.2668@tk2msftngp13.phx.gbl...  
  
methods

1/23/2006 3:46:36 PM    Re: Call stack
Does something like that exist for some other language/platform you work  
  
with (or is there some tool you know of that provides it for .NET)?  It  
  
sounds like you're looking for some sort of trace or profiling tool that  
  
stores call stack history.  That's not something I've ever seen in the tools  
  
I've worked with for .NET.  Would be cool to have, though!  
  
--  
  
Adam Machanic  
  
Pro SQL Server 2005, available now  
  
http://www.apress.com/book/bookDisplay.html?bID=457  
  
--  
  
"William Stacey [MVP]" <william.stacey@gmail.com> wrote in message  
  
news:OfVH$bFIGHA.516@TK2MSFTNGP15.phx.gbl...

1/23/2006 5:16:25 PM    Re: Call stack
Nothing I saw.  Just something I wanted to see for this particular debug  
  
issue and seemed like it would have been natural.  I suppose I could get the  
  
same behavior with trace log, but then I need to add that code to each  
  
method.  It sounds like that is what I would need in the future.  Thanks  
  
Adam.  
  
--  
  
William Stacey [MVP]  
  
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in message  
  
news:%23rJEe4FIGHA.984@tk2msftngp13.phx.gbl...  
  
tools  
  
is  
  
type)  
  
I

1/24/2006 1:04:43 AM    Re: Call stack
"William Stacey [MVP]" <william.stacey@gmail.com> wrote in  
  
news:uJQQqqGIGHA.2928@TK2MSFTNGP10.phx.gbl:  
  
Two ways:  
  
1. Add code, which goes through the call stack, to your methods. I used  
  
to do this when I wanted to see exactly who called who.  
  
2. Debugging through SOS (Son Of Strike). It's unmanaged debugging but  
  
through SOS you'll see what happens in managed code as well.  
  
Niels  
  
--  
  
**************************************************  
  
* Niels Berglund  
  
* http://staff.develop.com/nielsb  
  
* nielsb@no-spam.develop.com  
  
* "A First Look at SQL Server 2005 for Developers"  
  
* http://www.awprofessional.com/title/0321180593  
  
**************************************************

1/24/2006 11:03:35 AM    Re: Call stack
Thanks Niels.  
  
--  
  
William Stacey [MVP]