Visual Studio does not crash with the exception helper, but just stops the process

Typically, Visual Studio breaks if it encounters an unhandled exception and displays an exception helper window.

But in some cases, Visual Studio instead simply stops the running program and does not break or show the helper exception element.

Exception parameters (Ctrl + Alt + E) are configured correctly: the "user-unhandled" check box is checked on all elements, the "cast" is not set. In the debugging options, I turned on the exception helper.

Because this only happens in some cases, I tried to find out when the visual studio enters its “failure state to use exceptions”.

EDIT:

It seems that the faulty helper exception helper appears only in winforms applications and only after there has been some external action, such as calling a web service or opening a database connection.

End edit

It turns out the troubleshooting assistant works fine until the ADODB connection opens:

var conn = new ADODB.Connection();
conn.Open("Provider=SQLOLEDB;Server=localhost;Database=db;UID=user;PWD=pw;", "", "", -1);
throw new InvalidOperationException();

After the conn.Open statement is thrown, the exception helper will never start.

Does this sound familiar to anyone, and more importantly, does anyone have a solution to the problem? As you can imagine, debugging an application becomes very difficult if the application always just closes the exceptions.

+5
source share
4 answers

( ), , Microsoft : " Windows Form "

0

, , .

:

Visual studio 2008 sp1. , , VS sp1 , .

:

, , - Windows , , ! VS , , ( ).

, WCF, IIS7.5, - .

Windows. , , VS .

, Windows ( ) - , VS .

, , , , VS - Visual Studio 2008 sp1, .

+2

, , , . , , . , , , , sub, - .

: , , "/", , , , .... , , , , ( ? ?)

VS 2010 Premium Windows 7 x64... , , ( ). VB.Net, ( XML , , , ...), , , [...] . - ?

:: Edit:: BTW, , catch try , " ", , - , !
:: ::
, , , - , - , , : [Debug → Exceptions → "Break, :" → Common Runtime: Thrown] - , , , ... :: End Edit::

+1

I ran into specific circumstances, such as Jan Willem, with ADODB.Connection.Open kicked me out of the program in visual studio instead of going to the debugging assistant. The problem was that the requested provider was using a 32-bit dll , and I was compiling for 64-bit. Changing the project to 32-bit eliminated an exception in the visual studio.

0
source

All Articles