VS.Net debugger?

D

David Veeneman

I'm trying to debug a solution with two projects; a DLL that does some heavy
lifting, and a WinForms app that acts as a front-end GUI for the DLL. I'm
using VS.Net to develop and debug the solution.

I'm debugging the GUI project right now, and the VS.Net debugger works as I
would expect for exceptions thrown in in that project. But the VS.Net
debugger doesn't work for exceptions that occur in the DLL project when it's
called by the GUI, even though the DLL was compiled in debug mode, has a PDB
file, and is part of the same solution as the GUI. Instead, I'm getting a
dialog with a stack dump and language about how to invoke the JIT debugger.
I tried those steps, with no luck.

How come the VS.Net debugger isn't trapping the error? Am I limited to JIT
debugging? If so, is there any reliable source on how to get it working?
I've been through dozens of posts on enabling JIT debugging, but nodbody
seems to be able to get it working properly.

Thanks in advance for your help.

David Veeneman
Foresight Systems
 
A

apm

David:

Are both projects .NET?

Do you have a reference to the Debug version of the dll (or is your
reference to the Release version)?

David
 
D

David Veeneman

Are both projects .NET?

Both are .NET
Do you have a reference to the Debug version of the dll (or is your
reference to the Release version)?

Checked for that--reference is to the debug version
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

That should not happen, most of the times it's due to incorrect
referencing, do this:
1- Delete the reference to the DLL from the GUI project
2- search the GUI folder for any instance of the DLL and delete it
3- delete the compiled dll frm the dll folder , or even better delete the
BINs and OBJECTSs folders of both projects
4- Compile the dll
5- include the reference in the GUI project
6- Compile the solution

try again.


cheers,
 
D

David Veeneman

That should not happen

That's what I thought. I deleted the reference to the DLL in the GUI app,
exited VS.Net. Deleted bin and obj folders from both projects. Restarted
VS.Net, reloaded solution. Verified compile mode was 'Debug'. Compiled DLL.
Verified in Windows Explorer that DLL bin and obj folders contained only
Debug folders.

Went back to VS.Net, set reference to DLL in GUI. Compiled GUI. Launched
GUI, repeated steps to trigger exception--and I got the same dialog again.

Repeated the process, using the 'Project' tab to set GUI reference to DLL,
rather than using the browse button to look up the DLL. Same result.

I created a simple test rig made up of a Winform and a one-line DLL that
simply throws an exception. After verifying that the VS.Net debugger is
invoked by the DLL exception, I compared the sln and cjproj files from the
test rig projects to the projects in my solution. There are no obvious
differences, other than the fact that my solution is under VSS source
control, and the test rig isn't.

Any suggestions of where I might look to troubleshoot this problem? Thanks
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,


Well, not really now :)

What if you create a new win app and include your dll , if you can somehow
manage to get the same exception you would know if the problem is in the GUI
or in the DLL project.

Now the thing you are using VSS can introduce more incertaintity. what if
you copy both projects folders to a new location, remove the VSS lock ( RO
flag ) from the files and see what happens when you are not using VSS, I
don';t use it and I dont know what kind of problem it may introduce.


cheers,
 

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