Debugging VS 2010 - where does the method come from?

In C #, VS 2010, is there a keyboard shortcut to see where the breakpoint was removed from when debugging?

For example, if I have a breakpoint in the myMethod () method and it was deleted, how can I see which line it was called from?

+4
source share
6 answers

You can see the Call Stack. In VS, go to Debug> Windows> Call Stack. In debug mode, the call stack will show which methods have been called to reach the break point.

+8
source

If you open the Call Stack window, you will see a chain of method calls leading to the current line.

If you have one of the best versions of Visual Studio, you can also take a look at the Canvas debugger .

+3
source

Isn't the call stack window enough?

+1
source

You can look at the call stack, which will show you where the method call came from, you can open it by going to the "Debug => Windows" menu when the application starts or by pressing Ctrl + D, C.

+1
source

Are you looking for an entire call stack?

In this case, you can try this when your breakpoint is deleted: - From the Debug menu, select "Windows" and click on "Call Stack".

+1
source

In simple cases, the Call Stack window will show this.

If the compiler used tail call optimization or the nesting method, it may give an unexpected result. But this should not happen during debugging, as this (by default) disables these optimizations.

yield iterators and async methods show where they came from, not where they were originally called.

+1
source

Source: https://habr.com/ru/post/1379982/


All Articles