3

I need something like this Eclipse - showing full call stack (like when it hits breakpoint in debugger) without putting in breakpoints? : Need to show all code calls that have been performed without breakpoints at present. But for C# .Net. I use MS VS, but if you know other tools with such features - I will be glad.

ADDED: I want something like log of all calls but without implementing logger or introducing everywhere code Debug.WriteLine("StackTrace: '{0}'", Environment.StackTrace);

3
  • You want to get this call stack at which locations? The description is not exactly clear, and there is little information to be gleaned from that linked question unless you already know how Eclipse works (and I don't). What would you propose to do with this information? Are you just trying to build a call graph? Commented Dec 11, 2016 at 18:31
  • See stackoverflow.com/questions/8614157/… Commented Dec 12, 2016 at 1:18
  • @user1175338, what about this issue? Is the Resharper tool helpful for you?
    – Jack Zhai
    Commented Dec 13, 2016 at 10:50

2 Answers 2

2

One tool Resharper has the Stack Trace Explorer window which can display stack traces information:

https://www.jetbrains.com/help/resharper/2016.2/Reference__Windows__Stack_Trace_Explorer.html

1

Environment stack trace does what you're looking for

https://msdn.microsoft.com/en-us/library/system.environment.stacktrace(v=vs.110).aspx

3
  • Thanks for the answer. I may be poorly expressed, but I need all performed calls from a code(log of calls). It means that this code will be everywhere at all finite points of calls: Debug.WriteLine("StackTrace: '{0}'", Environment.StackTrace); Commented Dec 11, 2016 at 12:52
  • Sorry, don't understand what you mean. You can use it in a condition if you don't want to call it every time, or use only at points you want it called with an appropriate condition. Commented Dec 11, 2016 at 12:55
  • I worked with project with legacy code and I don't know this code. I want to see history of all performed calls at current moment. Commented Dec 11, 2016 at 13:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.