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 AMModerator
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
- Edited by Jesse JiangMicrosoft Contingent Staff, Moderator Tuesday, September 18, 2012 5:55 AM
-
Tuesday, September 18, 2012 1:55 PM
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.
- Marked As Answer by Jesse JiangMicrosoft Contingent Staff, Moderator Wednesday, September 19, 2012 8:58 AM
-
Wednesday, September 19, 2012 8:58 AMModerator
Thanks for sharing the solution.
Best regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us

