Debug breakpoints don''t attach in managed code .h file
When I set break points on C++/CLI code contained in a header file, for example a dialog created with the designer, the break points sometimes fail to attach at debug time. By sometimes, I mean that most files don't work, but a few do. This behavior is consistent within the project, the ones that don't work, never work, the ones that do, always do. I have tried a bunch of things with no solution: Work arounds: Native code in .h files ALWAYS works. This issue appears to affect managed code only. The break points that don't work turn into a hollow circle when the program starts, and the tool tip says "The break point will not currently be hit. No executable code is associated with this line." The project I am working on contains mixed managed and native code, and I am using the IDE to build and debug with standard (I believe mostly default) settings.
1) New project with a dialog - Break point worked.
2) Simple Old project (vs2003) converted to new project (vs2005) - Break point worked.
3) Complex Old project (vs20003) converted to new project (vs2005) - Most breakpoints do not work.
4) Complex converted Old project, stripped down until it contained only a single .h file with dialog and a .cpp file with main() - Break points did not work.
5) New project with individual files copied from old project - Break points initially worked, but stopped working later as I made the new project match the old project. I do not know the exact point at which they stopped working.
1) Cut the code from the .h file and simply paste it in a .cpp file.
2) Create a .cpp file, include the .h file, and create a dummy global function eg. 'void F() {}' This function must be global, but need to reference anything in the .h file. This hack does not always work. It seems to not work if the .h is included by more than one file.

