Template class breakpoints breaks if I make a change

Answered Template class breakpoints breaks if I make a change

  • Monday, September 17, 2012 5:28 PM
     
     

    Hello

    If I make a change to a method of a template class, the breakpoints wont be valid anymore unless I rebuild the entire project. Is there a shortcut ?

    Thanks.

All Replies

  • Tuesday, September 18, 2012 5:51 AM
    Moderator
     
     

    Yes, You should rebuild the project after you change the codes.

    Not like the Script language, you can change the codes when you debug it.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us


  • Tuesday, September 18, 2012 1:55 PM
     
     Answered

    I found the solution. A template class is not compiled like a regular .cpp file. Instead the code of the template class is expanded in the .cpp class which invokes the template class. So for the breakpoint to work, one must find the .obj file of the module which invokes the template class, delete it and re-link the project. This will prevent the need for a complete rebuild.

  • Wednesday, September 19, 2012 8:58 AM
    Moderator
     
     

    Thanks for sharing the solution.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us