3
votes

since I am using vs 2017 I am missing one of my most used features I was using in vs 2008 and 2010. In previous Visual Studio versions you were able to setup exception handling. VS2010 for expamle: Debug=>Exceptions=> CLR Exceptions => Thrown checkbox

When I checked this checkbox he would break on every exception which was thrown (did not matter if handled or unhandled). This was a huge bonus because in bad code were logging was very bad you allways found the issue pretty fast.

Now I am working on a project with pretty bad logging and I am getting a lot of exceptions in the output window but not in the log. But I simply can't find the damn code line and the studio debugger is not breaking at the exception.

I found this this and checked "all exceptions in this list". But it did nothing and the studio just ignored it. I am desperately looking for that good old "thrown" features from 2010. It obviously has to be a handled exception. Anyone knows where I find that must have feature in this new fancy studio?

Best regards

1
are you getting first chance exceptions ? - TheGeneral
Are you debugging in a mixed mode environment? If you are, you might need to enable 'native debugging' in the project properties. - Baldrick
Hi guys :). No first chance. But i think I found the issue. We are working with post build events to copy builded dependencies into a common dependency directory. Our projects also relate to that common directory. Apparently visual studio has issues to load the debug informations in time. it does not appear allways which makes it harder to pin down. But when it happens and he wasn't able to load the new debug informations for the modified and copied library it helps to delete the library in the dependency directory and rebuilding it. Very odd thing. - Dev86
When he was able to load the debug informations in time for the new builded library the method from the link i posted works. If the wasn't able to load the debug informations it does not work (which is understandable but still a pain in the ass). - Dev86
@Dev86 Glad you solved your problem! Please post the solution you found as an answer to your question. It's fine and even encouraged to answer your own questions. Comments on questions are meant to clarify the question, not to provide answers. - Søren D. Ptæus

1 Answers

1
votes

The provided solution here does work. I did not work in my case because he had and still has issues loading the debug informations of other libraries. If you have similar issues, make sure that he has loaded the necessary debug informations. I am not working with project references because of the project size. We are working with post build events which do copy the output libraries to a common directory which we are refering to as reference path. In my case deleting the libs there and rebuilding them did the job. He loaded the debug informations correct and was able to break even at handled exceptions.

Best regards