none
Configuring Exception Settings to not break when I throw Exceptions (VS2015)

    Question

  • Hello,

    I just transferred some source code from one computer to another. On the old computer, I would develop in VS2015 and the exception settings would be setup to not break when the code explicitly throws an exception. By "explicitely" I mean there is a line in the code which deliberately throws an exception like this:

    throw new Exception("my exception message");

    I'm working in an MVC application which is configured to handle exceptions by sending the exception message back to the browser where it is displayed on the screen in a special user-friendly message box handled by javascript. Somehow my old VS2015 environment recognized when the exception was of this sort and didn't break. Now I'm working in a new environment (new computer, fresh VS2015 install) and it's breaking where the exception is thrown and at all points in the call stack where it is re-thrown.

    I researched this and the hits I got told me to set "Continue when unhandled in user code" under Additional Actions for Common Language Runtime Exceptions in the Exception Settings window. But this is not working.

    Does anyone know what else I can do?
    Monday, January 09, 2017 5:37 PM

All replies

  • Hi,

    Welcome to MSDN forum.

    According to your description, your issue is more related to visual studio general questions, I will move your thread to https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=visualstudiogeneral for a professional support. Thank you for understanding.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 10, 2017 5:50 AM
  • Hi gib898,

    Please refer to the following blog about Enabling Exceptions to Break When Throw:

    In VS please click Debug->Windows->Exception Settings:

    When a box is unchecked or an exception is not in the list, the debugger will only break execution when that exception type is unhandled.

    https://blogs.msdn.microsoft.com/visualstudioalm/2015/02/23/the-new-exception-settings-window-in-visual-studio-2015/

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 10, 2017 6:55 AM
    Moderator
  • Hi friend,

    If my reply help you resolved your issue, please remember to mark it, which could help others who has the same issue as you.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 18, 2017 2:37 AM
    Moderator