Re: .NET equilavent to C's backtrace(), or How do I find a calling function?
- From: "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
- Date: Thu, 4 May 2006 16:59:49 -0700
cmn_ wrote:
My problem is this:
I am programming an application in C#.NET / WinForms. It contains a
MonthCalendar, and whenever the DateChanged event is fired, and *only*
when changing the month, the application goes into an infinite loop.
The event procedure is in a seperate thread, although I'd rather not
post it here until asked (there's a *lot* of code there).
On top of this, the event procedure is called from several places in
the code. How would I find which function called the event procedure
in code? If there is no way to find the caller of the function, is
there something like the Backtrace() function in the Standard C
Library? (btw, yes I am a C rather than C# coder...)
FWIW, there's no such function in the standard C library as backtrace -
that's strictly a GNU libc extension.
As Ben already replied, you can get the precise stack trace from
Environment.StackTrace.
-cd
.
- References:
- Prev by Date: Re: Not logging in application log
- Next by Date: SmtpClient not accepting self-signed certificate
- Previous by thread: Re: .NET equilavent to C's backtrace(), or How do I find a calling function?
- Next by thread: Memory leak when using OleDb
- Index(es):
Relevant Pages
|
Loading