If you have a VisualStudio IDE then a simple way is
Attach the VisualStudio debugger to your application. And after that select
Debug->Exceptions (Ctrl+Alt+E). Then you can
select from a range of exceptions that you would want the debugger to
track. And every time an exception is thrown and if it is the type you are
interested then the debbuger will break at the point where the exception is
being thrown. If you are not sure about what exception to capture you can
"check" the top level "Common Language Runtime Exceptions" and your
debugger will break for all the exceptions that are encountered.
--------------------
From: "cs" <[rem]casolorz[rem]@hot[rem]mail.com>
Subject: capturing crash
Date: Tue, 4 Nov 2003 16:33:25 -0600
Lines: 7
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#V**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: ppp-67-64-23-92.dsl.wchtks.swbell.net 67.64.23.92
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196751
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
How can I capture the events leading to my windows application crashing?
would a big try catch around the Application.Run() do the job? in my head
that launches a thread and if that thread crashes somehow my try catch wont
do crap, maybe im wrong.
So what do you guys do to capture a possible application crash?
Rakesh, EFT.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm