Debug with Test Explorer breaks on failed test

Sysprogs forums Forums VisualGDB Debug with Test Explorer breaks on failed test

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35882
    Jensa
    Participant

    Hi,

    When using the Test Explorer to debug unit tests (GoogleTest with Linux projects) it seems to automatically add a breakpoint to the SysporgsTestHook_TestFailed() method so that the debugger always breaks on all failures. Is there an option to disable that so it can run freely even on errors? I haven’t been able to find any when searching for it.

    Regards
    Jens Nilsson

    #35884
    support
    Keymaster

    Hi,

    This is by design. You can try using the “Run All Tests” or “Run Selected Tests” commands to run multiple tests. VisualGDB will record the call stacks for the failing ones, and automatically continue running the remaining tests. Then, once you narrowed down a specific failing test, you can run just that test in debugger, and VisualGDB will automatically stop the debug session when the test failure occurs. You can still press F5 to continue to the next test though.

    If this doesn’t work, feel free to describe what you are trying to achieve, and we will try to suggest a better way to do it.

    #35886
    Jensa
    Participant

    I prefer to Debug the tests though because it’s much easier to find and handle the occassional exception, assert or other rare error you may get while in early (or sometimes late) development.
    Also we don’t just use the test frame work for small unit tests but for full system tests across multiple HW platforms and OSes plus with external HW dependencies so it’s not always possible to keep all tests 100% ok for all systems.

    It’s a nice feature that someone probably enjoy but for me it’s causing me to stop using the Test Explorer for the VisualGDB targets and just debug the unit tests manually instead. But when you use it for windows projects you get used to how easy and convenient it is.
    So for us an option to turn it off would be good.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.