Hi,
It's usually a dream come true when my software never crashes however I have a problem where Visual Studio C# express does not jump into the debugger when an error has occured when developing my software.Simple example
private void Form1_Load(object sender, EventArgs e)
{
String path = Application.StartupPath + "\\invites.xml";
String data = System.IO.File.ReadAllText(path);
MessageBox.Show("HERE");
}
The invites.xml does not exist on my system, so when I run the program using the IDE, I expect it to crash on the String data... line and give me a chance to debug.
What is happening though, is that when I run the program, the applications form is shown. Completely ignoring the MessageBox line, and completely ignoring the fact that the file does not exist. This is becoming a nightmare to code with as I can't tell if I have had a crash in the application.
If I run the executable from the bin directory manually however, I get the normal unhandled exception dialog stating the file does not exist.
Have I mistakenly turned off something in the Visual Studio Express settings that is causing this?
Thanks
Loading
VulpesPosted May 30, 2013, 9:06 AM
However, they should show up in the normal way when you 'run without debugging'.
EDIT:
I found some more about it here and apparently it's only a problem on 64-bit windows which I hadn't realized before:
http://blog.adamjcooper.com/2011/05/why-is-my-exception-being-swallowed-in.html
Neha SharmaPosted May 30, 2013, 9:06 AM
Ian GorsePosted May 30, 2013, 9:02 AM
Neha SharmaPosted May 30, 2013, 9:00 AM
if you have done, you can close this thread.
Ian GorsePosted May 30, 2013, 8:57 AM
I have managed to solve the issue by clicking Debug > Exceptions and checking the Thrown box for Common Language Runtime Exceptions
Neha SharmaPosted May 30, 2013, 8:52 AM
can you show the screen shot to tell us how vs working or crashed there??