0

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:

enter image description here

Even if I create the new Managed Test Project from scratch with simple HelloWorld method, the breakpoint is not hit.

Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
  • HelIo Hans, added screenshot how I created a project. – Tomas Kubes Sep 13 '15 at 20:01
  • @HansPassant: It is really Community Edition (according to About Box). By the way On my second (company) laptop I really got these ultimate features because of bug in Visual Studio, see http://stackoverflow.com/questions/25537040/how-possibly-did-intellitrace-become-available-on-my-visual-studio-professional/28464689#28464689 – Tomas Kubes Sep 13 '15 at 20:11

0 Answers0