Visual Studio C # project - C ++ breakpoint issue, but debugging still partially works

I am currently working on a C # project that has a C ++ / CLi wrapper over some C ++ code. I am debugging this project by attaching it to a process (I have no other choice, so I cannot work around the problem that I will discuss).

(OS is Windows 7 Pro, with Visual Studio 2013 with, I believe (check later) full package).

Debugging (both native and managed .NET .NET code) worked fine until I made some changes or maybe hit some random shortcut (don't know what I did, tbh, it must be it was at the end of the day, "Don't notice right away, but I don't remember seeing anything unusual).

Here's how it's done now:

  • C ++ breakpoints are no longer hit, and when dropped over them have the following message: "At the moment, the breakpoint will not be removed. This line will not run executable code like the target code of the debugger. Possible reasons include: conditional compilation, compiler optimization or... "
  • C ++ / CLi breakpoints have the same indication when I hover over them and don't hit them.
  • C # breakpoints are working fine.

BUT if I attach my process and debug and I hit a breakpoint in C #, I can then go to C ++ / CLi code and the debugger will see that the objects being manipulated , I can look at the variables and see their values ​​and theirs updates. I can even step into C ++ code, but in this case, the debugger cannot look at the values ​​and states of objects.

Here are the things that have been tested / discovered so far:

-Checked that the dll files were correctly generated and copied (this is the case and pdb files are generated on every build as well).

- the debug module does not report anything unusual. All symbols are specified for loading into project files.

- Debug source code is selected both when attaching a process and in the properties of the startup project.

- Code optimization disabled. Legacy Managed Code parameters.

-Trying to go back to the last functional commit (two days ago) but no dice. This may indicate that this is a compilation or debugger configuration issue. Or maybe a mistake.

- Tested cleanup repairing each solution, one at a time.

-Load restarting Visual Studio then machine.

- I have a memory access violation in my C ++ code, with no specific reference to the problem here BUT when debugging, the STILL debugger pointed to the line in my code that was causing the problem, although it supposedly cannot link the C ++ source to the running one process.

- Only one instance of the process (although for some reason I no longer see the gray version of this process .vshost.exe. This is the only other change I have noticed since I took advantage of the halting issue).

This question puzzled me the last day, as well as a few more experienced colleagues (one of them in particular is very experienced with different versions of Visual Studio since the early 2000s).

Any ideas? From what I've seen, the breakpoint message isn't all that uncommon (my colleagues have encountered and solved it before), but this slightly different activity is quite peculiar and seems to be harder to track down.

I mean, since it's still debuggable and Visual Studio doesn't indicate that the source files and the executable code are different (this was before I forgot to build before starting and the attach process) it will look like the same code , and VS at least partially admits that ...

+3


source to share





All Articles