c++ - Breakpoints that conditionally break when a pointer to a base class points to a specific subclass -
is there proper way set conditional breakpoint in visual studio 2015 such breaks whenever pointer base class points specified subclass type? (see example screenshot below)
i don't want have spend time writing debug utility code this, nor want hack virtual table data.
two ways it:
add below breakpoint condition in ide:
dynamic_cast<derivedclassyouwanttobreak*>(ptr.get()) or add below code code , compile:
if (dynamic_cast<derivedclassyouwanttobreak*>(ptr.get())) { int breakshere = 0; // put breakpoint here } 
Comments
Post a Comment