none
"Just My Code” checkbox on the Debug Options Menu breaking in libraries code

    Question

  • Hi,

    Hi have the option "Just my code" checked, and at the same time the option "Break When Thrown" for CLR Exceptions, in the Exception Settings tab, in Visual Studio 2015.

    The problem is that the debugger is still breaking in all internal exceptions thrown and caught internally on my Nuget packages libraries. 

    I find this option very useful, since I can trace immediatly where's the source of my problem, or I can find exceptions that I was caughting and ignoring wrongly, instead of just finding these "hidden" exceptions in production.

    What is very annoying is that then some of my Nuget Packages throw like 20 exceptions all the time and I'm being bombarded with them. Since I checked the option "Just my code" this shouldn't happen.

    Thanks,

    Miguel

    Tuesday, January 26, 2016 10:05 AM

Answers

  • Hi Miguel Dublin,

    >>and at the same time the option "Break When Thrown" for CLR Exceptions,

    Could you please tell me how do you set the options in Break When Thrown for CLR Exceptions? And please tell me which NuGet packages libraries you are using and the detailed steps to help me to reproduce your problem.

    In my opinion, the My Code means the code and libraries that you write and referenced in your project, which is not encapsulated by Microsoft. Most of NuGet package libraries are developed by communities, so I think they also belong to My Code, that is why the debugger is still breaking in all internal exceptions thrown and caught internally when checked Just My Code.

    Best Regards,
    Weiwei

    Wednesday, January 27, 2016 6:26 AM
    Moderator