My MessageBox.Show() function works well when I started to double click myApp.exe.
But When I tried to attached the Application process with source code. and set breakpoint
At the code below, It doesn’t work. What I mean is the MessageBox didn’t pop-up. And the code catched by another outer exception handling. Does it caused by multi-threading timing issue?
I don’t know why?
Thanks.
if (File.Exists(myConfigFile))
{
doc.Load(myConfigFile);
}
else
{
MessageBox.Show("Read " + myConfigFile + " failed, can't find the file",
"Critical Warning",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
I think that your source code has some differentiation from the attached process. you should rebuild your solution first, then start your newly created application exe from the solution folder “either at bin\debug or bin\release” depending on your build target, and then attach application process with source code.