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.

enter image description here

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

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -