How to pause Visual studio debugger on Q_ASSERT fail.



  • Q_ASSERT is exiting the application but I was expecting it to pause the debugger. Do I need to set any flag to do the same? Basically I am looking for something which can pause the debugger on particular a condition. Please let me know if there is anyway to do the same.



  • Please have a look at "this recent thread":/forums/viewthread/13148 and discuss there, it covers the same question.


  • Moderators

    The thread Volker is referint to is discussing the details of the q_assert handling and that it will result in fatal error.

    I never used Q_ASSERT, but the standard assert and its features in visual studio. The standard version is also resulting in an unconditional stop of execution. Nevertheless, when you started the progam in the debugger it allows you examine at least some of the values accessible around the assert. This is for msvc 2005. If the Q_ASSERT does not allow that, you might want to use the standard assert.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.