I am trying to debug C++/CLI Unitest, but the breakpoint cannot be hit. I have spent second hours hunting for the problem without any success.
How is the general procedure to to find the cause. What step should I do?
What I have done:
- I have check the project properties, that Debugger type is mixed
I have checked that symbols are loaded:
'QTAgent32_40.exe': Loaded 'C:\git....\Out\mydll.dll', Symbols loaded.
I have checked that PDB file is compiled and available in the folder.
- I have checked that Debug Information Format is /Zi
- I have checked that Optimization is disabled.
- I have checked that preprocesor defintion _DEBUG;DEBUG are available
- I have checked that Generate Debug Info is Yes (/Debug)
- I have added line System::Diagnostics::Debugger::Break(). The breakpoint hits, but the source code is not available.
Want I am missing at most is some analytic approach. I am only able to check several options, but I don't know how should I proceed generally with this kind of problems. How to inspect "why". How to get the reason why breakpoint is not hit. I mean something "How to debug debugger"
I use Visual Studio Community Edition 2015 with V120_xp platform toolset. It is problem only of this project/solution. Another projects (C#) works fine with the debugger.
UPDATE:
I created the test by following:
Even if I create the new Managed Test Project from scratch with simple HelloWorld method, the breakpoint is not hit.