Visual Studio Developer Center >
Visual Studio Forums
>
Visual Studio Debugger
>
Can't see exception details and calling stack in Visual C# Express
Can't see exception details and calling stack in Visual C# Express
- Hi,
If an exception occurs in my code, a message box pops up saying the program has encountered an error and sorry for the inconveniences and whether I would like to inform Microsoft about the problem. This is the usual error window when any applications encounter an error. But I see no any Exception Assistants, nor can I see the call stack and the details of the exception in the Output window. I have enabled the Exception Assistant in Tools -> Options -> Debugging -> General, but still it does not work. Also, I have uninstalled and reinstalled Visual C# Express. Can anyone help me with this, please?
Thank you,
Tamas
Edit:
Since then I realized there is also such a window as 'Call Stack'. However this doesn't show anything either. Moreover the right-mouse-click on this Call Stack window works only when I click Debug -> Start Debugging for the first time after opening Visual C# Express. If I Start Debugging for the second time, the shortcut menu does not come up. I foresee the 'spend three days on one little stupid annoying issue' situation, so if anyone has any ideas, it would be much appreciated. Thanks.
Edit 2:
I have installed Visual Studio 2010 Beta 1, have run a piece of code and the situation is the same. The Call Stack window does not show anything. the right-mouse-click on this Call Stack window works only when I click Debug -> Start Debugging for the first time after opening Visual C# 2010. If I Start Debugging for the second time, the shortcut menu does not come up. Am I missing something very silly and fundamental? Or shall I reinstall the .Net framework or the whole operating system to get it work? I'll buy a new pc in about a month, so I'll try that anyway.
All Replies
- I'm not sure I am clear on what you are doing.
In order to see the Call Stack, you need to have a break point set somewhere. Do you have a break point set?
Do you have an Exceptions option in your Debug menu? (I don't have the Express version, so I don't know if this feature is available in express.)
Another thing you may want to check out is a global exception handler. This normally prevents the "program has encountered an error" problem.
Here is some info on a global exception handler:
http://msmvps.com/blogs/deborahk/archive/2009/09/02/global-exception-handler-winforms.aspx
Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS! - Hello Tamas,
Have you tried the suggestion DeborahK provided? How about the issue now? Does it still occur?
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework! - Hi,
Thank both of you for the replies. Yes, the issue still does exist. What DeborahK suggested, logging any possible exceptions myself is fine for overcoming the problem. However it is still very annoying that this feature is not working in the IDE.
This is what I am doing in a clear way: 1. Writing a code that generates an unhandled exception. 2. Trying to debug the exception in Visual C#, looking at the call stack and the exception details. ...which I am unable to do.
Tamas - Hello Tamas,
Please make sure that we set the configuration manager to Debug mode. Besides, if we add a line of code like:
System.Diagnostics.Debugger.Break();
in our source code (for example, in the Form_Load event), could we break and see the call stack?
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback, please tell us.
Welcome to the All-In-One Code Framework!


