How do I find the stack trace in Visual Studio?

.NetVisual StudioDebuggingException HandlingStack Trace

.Net Problem Overview


I ask because I couldn't find the stack trace in Visual Studio, while debugging an exception that occurred.

.Net Solutions


Solution 1 - .Net

While debugging, Go to Debug -> Windows -> Call Stack

Solution 2 - .Net

While debugging, when you hit a break-point.

CTRL+ALT+C

enter image description here

Solution 3 - .Net

The default shortcut key is Ctrl-Alt-C.

Solution 4 - .Net

Do you mean finding a stack trace of the thrown exception location? That's either Debug/Exceptions, or better - Ctrl-Alt-E. Set filters for the exceptions you want to break on.

There's even a way to reconstruct the thrower stack after the exception was caught, but it's really unpleasant. Much, much easier to set a break on the throw.

Solution 5 - .Net

Using the Call Stack Window

To open the Call Stack window in Visual Studio, from the Debug menu, choose Windows>Call Stack. To set the local context to a particular row in the stack trace display, double click the first column of the row.

http://msdn.microsoft.com/en-us/library/windows/hardware/hh439516(v=vs.85).aspx

Solution 6 - .Net

Consider this as the current update (Windows 10 (Version 1803) and Visual Studio 2017): I was unable to view the stack trace window and did find an option/menu item to view it. On investigating further, it seems this feature is not available on Windows 10. For further information please refer:

https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/viewing-the-call-stack-in-visual-studio

Copied from the above link: "This feature is not available in Windows 10, version 1507 and later versions of the WDK."

Solution 7 - .Net

For Visual Studio 2019, the shortcut (while debugging and stopped at a breakpoint) is:

Ctrl+Alt+C and now you can also use Ctrl+L

The screenshot is pretty old. Here is one for Visual Studio 2019 (under the debug menu):

Visual Studio 2019 Call Stack Menu Option

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEven MienView Question on Stackoverflow
Solution 1 - .NetcdonnerView Answer on Stackoverflow
Solution 2 - .NetCharithJView Answer on Stackoverflow
Solution 3 - .NetBrian RasmussenView Answer on Stackoverflow
Solution 4 - .NetOfek ShilonView Answer on Stackoverflow
Solution 5 - .NetKumar ManishView Answer on Stackoverflow
Solution 6 - .NetVinView Answer on Stackoverflow
Solution 7 - .NetbraXView Answer on Stackoverflow