none
Program doesn't break when error in the debug mode RRS feed

  • Question

  • Dear Team, 

    When i run a project through the visual studio. usually the program will break and focus on the line of code with problem. 

    But one my project just doens't break the program whenever there is an error. 

    I have tried to clean and build again.  But it doesn't work. I open some other project on the same PC the break point working. Seems like only happened on this particular project

    Monday, July 2, 2018 3:13 AM

All replies

  • Hi limcheehang

    If it is in debugging, the exception will automatically get stuck in the exception statement. When you continue to run, if you can continue to indicate that the exception is a minor exception, the system will handle it for you. If you are stuck here, it is an exception that will cause the program to crash.

    Best Regards,
    Alex


    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.

    Monday, July 2, 2018 6:01 AM
  • If your project is set for compile release with no debug you will not break on break points. Make sure on the project properties debug tabe the configuration is set on Active (Debug).

    Make sure your project is set to break on CLR errors as shown here.

    Monday, July 2, 2018 11:37 AM
  • Hello,

    • What exactly is the error, please show realavant code.
    • Where is the code e.g. form load event, button click event, class method? 

    Try the following setting then run the project.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, July 2, 2018 11:53 AM
    Moderator
  • If your project is set for compile release with no debug you will not break on break points. Make sure on the project properties debug tabe the configuration is set on Active (Debug).

    Make sure your project is set to break on CLR errors as shown here.


    Also note that if you are using unmanaged code and the error occurs in the unmanaged portion, the editor may not break on the error.

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Monday, July 2, 2018 12:59 PM
    Moderator