Search code examples
c++visual-studiovisual-c++visual-studio-debugging

It is possible to automatically break upon entering code from specific file/class?


I have a badly written file in c++ that I need to debug in Visual Studio. I would want break execution of my program always when code from that file is called. Entire file (by that i mean .cpp + .h files) is a huge class and helping enums that are used by that class. Is there a way to set debbuger to break when program is reaching code from that file or class other than manually setting breakpoints on each method?


Solution

  • Visual Studio allows class breakpoints

    enter image description here

    This will allow you to break in the executable lines of your class as soon as its code is called. Constructors included.