views:

245

answers:

3

Hi,

I have a solution comprising of about 6 projects, and when I debug on one machine, any un-handled exceptions that occur cause the environment to break at the point that exception is thrown, allowing me to debug it.

However, on a different machine with the same solution (in the same version of VS), all I get when an exception is thrown is the "Visual Studio Just-In-Time debugging" window popping up, which tells me the name of the exception, and little else - it offers to open a new visual studio instance in order to debug it, but that doesn't work, because it is already being debugged by the IDE!

What is going on, and how can I get back to visual studio telling me where the exception happened?

Cheers

A: 

Sounds like it can't find the debug info.

Try copying the PDB files to your output directory.

demoncodemonkey
+2  A: 

You might want to check Exceptions in the Debug menu (mapped by default to Ctrl+Alt+E) and verify that both machines have the same exceptions selected.

Probably on the second machine you have less exception types selected in that window. When one of the exceptions that are not selected is thrown:

  • the debugger does not handle it because it has been instructed not to
  • the exception gets passes to the OS
  • the OS launches the default system-wide debugger which is the "Visual Studio Just-In-Time debugging" launcher if you installed VS2005 on that machine.
Catalin Iacob
A: 

I've had this problem as well - two machines, identical exception settings, different behaviours. The solution for me was to set the Debugger Type in the project properties on the "bad" machine to Mixed, even though the application only contains managed code. On the "good" machine exceptions are caught in Visual Studio using the Managed Only setting.

Adrian Cox