locked
How to put a breakpoint at class level for multiple classes in one step? RRS feed

  • Question

  • Hi, I have a C++ *.Sln that has apx twelve *.vcproj and apx a thousand classes in it. I am new to the Sln, and I would like to become familiar with the execution flow by putting break points at all classes present in the Sln, and then run the product in VS IDE Debug mode, and become familiar with the classes participating in the workflows end-to-end by simply visiting each class method via a breakpoint, and then proceeding further by 'F5' and so on. I tried to select multiple classes in the class-view, and then right-clicked to see if I can put a class level break-point for all these selected classes, but I do not see any such context-menuItem. I suggest VS development team to look into this need to help leads like me to quickly grasp the inner details of the Sln that we got on hand in the job. Thanks.

    Saturday, August 1, 2020 9:28 AM

All replies

  • What is an apx?

    There are abundant tools available for analyzing source code without executing it. That is what is commonly used; it is uncommon to use the debugger as the primary tool for analyzing an application and that is why the tools you are asking for are less common. There is nothing at the class level that executes. Everything in a class that executes is a method, even the constructors. As far as I know there is no way to put a breakpoint on every method in a class automatically in a single action.

    When I began programming we only had printed source code to analyze applications. And we could get test runs only about twice a day. Later we had display terminals that were dumb (they were called dumb terminals); that was before the existence of systems such as PCs. Current technology is a vast improvement; the hardest part is learning how to use it.



    Sam Hobbs
    SimpleSamples.Info

    Sunday, August 2, 2020 5:42 PM
  • Hi Screenivasa Murthy G,

    What is your version of visual studio? 

    If you are using visual studio 2017 and older version, you could follow these steps:

    1. press 'CTRL+K,B' in visual studio 
    2. then press 'Namespace::Class::*'
    3. Open Breakpoints windows in Menu Debug/Windows/BreakPoints, and then you could manage them

    If you are using visual studio 2019, 'Namespace::Class::*' will be released in the future version. Please refer this thread.

    And we also recommend you could provide a suggestion to product team through: https://developercommunity.visualstudio.com/content/idea/post.html?space=8 

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Monday, August 3, 2020 4:51 AM