Source-code debugging not working

D

David Veeneman

I'm working on a program with two assemblies that I have written in VS.Net--
a DLL and a Windows Form app that drives it. When the CLR hits an unhandled
error in the DLL, it does not show me the error in the source code, as it
normally does. Instead, I get a dialog box that says an unhandled error has
been encountered, with a dump of the exception. The dump starts with "See
the end of this message for details on invoking just-in-time (JIT) debugging
instead of this dialog box."

To isolate the problem, I put statements in both the driver app and the DLL
to throw a test exception. The driver app exceptions takes me to the source
code for VS.Net debugging. But in the DLL, I get the dialog.

Can anyone tell my why this is happening? Are there any good articles on the
issue? Thanks in advance.

David Veeneman
Foresight Systems
 
B

Brett Romero

Instead of throwing a specific exception, have you tried just doing for
something more generic:

try{...}
catch(Exception ex)
{Console.Write(ex.message);}

Are both app and DLL in the same solution?

Brett
 
D

David Veeneman

Both projects are in the same solution. I did put a try-catch block around
the error indicated in the dialog, and it caught the exception. I get the
exception dialog only on unhandled errors in the DLL.

Any thoughts on what's causing this? Thanks again.

David Veeneman
Foresight Systems
 
B

Brett Romero

Do you also have the try/catch block in the DLL? Sounds as though you
are getting an error through by the runtime rather than something that
would probably be more useful coming from the Exception class.

Brett
 
D

David Veeneman

Yes, I put the try/catch block in the DLL, since that's where I'm having the
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top