locked
Fatal errors silently failing RRS feed

  • Question

  • This is the third location in which I've used Visual Studio.  Previously, when I was in debug mode and hit an error, the program would "break" and the offending line would be highlighted in yellow.  Here, the program silently fails in debug mode when hitting a fatal error.

    Any idea what is the difference?

    Monday, October 17, 2011 4:16 PM

Answers

  • The root cause would be that the breakpoint has not been hit, the application has exited before the code executed to that code line.

    You can just use a MessageBox before that code line to let you know if the code executed as you expected.

    Another option would be set a breakpoint at the application entry point (Main method).

     

    If there's any concern, please feel free to let me know.

    Best wishes, 


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Mike Dos Zhang Monday, October 24, 2011 8:43 AM
    • Marked as answer by Mike Dos Zhang Tuesday, October 25, 2011 10:04 AM
    Wednesday, October 19, 2011 1:30 PM
  • You may try to control the behaviour of VS Debugger exception handling through 'Exceptions' dialog:

    Debug->Exceptions... .

    To stop on first time notification, you may check the specific exception-type(s) in 'Thrown' check-box(es). Else an exception (for example) in a __try block, will not stop at offending line, only log a message in 'Output' window and if the exception cannot be handled successfully in the exception-handler(s) the app may crash without further notice.

    With kind regards



    Wednesday, October 19, 2011 3:32 PM

All replies

  • The root cause would be that the breakpoint has not been hit, the application has exited before the code executed to that code line.

    You can just use a MessageBox before that code line to let you know if the code executed as you expected.

    Another option would be set a breakpoint at the application entry point (Main method).

     

    If there's any concern, please feel free to let me know.

    Best wishes, 


    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Mike Dos Zhang Monday, October 24, 2011 8:43 AM
    • Marked as answer by Mike Dos Zhang Tuesday, October 25, 2011 10:04 AM
    Wednesday, October 19, 2011 1:30 PM
  • You may try to control the behaviour of VS Debugger exception handling through 'Exceptions' dialog:

    Debug->Exceptions... .

    To stop on first time notification, you may check the specific exception-type(s) in 'Thrown' check-box(es). Else an exception (for example) in a __try block, will not stop at offending line, only log a message in 'Output' window and if the exception cannot be handled successfully in the exception-handler(s) the app may crash without further notice.

    With kind regards



    Wednesday, October 19, 2011 3:32 PM
  • I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?

    Mike [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, October 24, 2011 8:43 AM