etogoe
January 16th, 2003, 07:38 AM
Is there a way of finding the name of the method presently executing in order to include the method name in a debug printout ?
|
Click to See Complete Forum and Search --> : Finding name of a method etogoe January 16th, 2003, 07:38 AM Is there a way of finding the name of the method presently executing in order to include the method name in a debug printout ? pareshgh January 16th, 2003, 11:43 AM when you are in debug mode then put a break point where u are and go to debug of vs.net then under window you can see call stack or you could press CTRL+ALT+C and print the stack trace. or do you want the text file programatically. in that case your question seems to be too brief. Paresh etogoe January 17th, 2003, 01:09 AM I want to include trace/debug statements in deployed code where the name of the method issuing the trace statements is included in the statement pareshgh January 17th, 2003, 12:18 PM look in TRACE public int Main(string[] args) { Trace.Listeners.Add(new TextWriterTraceListener(Console.Out)); Trace.AutoFlush = true; Trace.Indent(); Trace.WriteLine("Entering Main"); Console.WriteLine("Hello World."); Trace.WriteLine("Exiting Main"); Trace.Unindent(); return 0; } for more info or problem you could find here PareshGotDotNet (http://www.gotdotnet.com/Community/MessageBoard/MessageBoard.aspx?ID=6) codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |