Reputation: 143
I am facing lot of issue to exe crash on production server however I want to dump file when exe crash with detail log.
I have found procdump tool. Can you suggest code c# which manually crash exe, so can check what kind of information get in dump log.
Upvotes: 1
Views: 2407
Reputation: 22083
The best, which can't be caught, is creating a stack overflow exception. This one will fall thru the try/catches...
void MyMethod()
{
MyMethod();
}
Upvotes: 2
Reputation: 59641
A crash is caused by an exception which is not caught. Just throw one in your code
throw new Exception();
and do not add a try-catch block anywhere.
Upvotes: 5