0

I am trying to debug my program which is set up like this:

(Native) C++ -> C++/CLI (as dll) -> C# (as dll)

I work in Visual Studio and activated mixed debugging mode in the projects. I also turned off the "Enable Just My Code" option and turned on the "Enable Source Server Support" option. I added the folders in which the .pdb files of the dll projects reside to the symbole paths. And also enabled the Microsoft Symbol Serverthere.


Now I am able to reach breakpoints which I set in the code of the two dll projects. However, I am not able to use "step over" or "step into", I can just move forward to the next breakpoint. Since I want to step into the code of the System.Core.dll and I don't know of any way to set a breakpoint there beforehands, this is a problem.

Every time I try "step over" or "step into" I get an error message (in german) which translates to:

Jumping not possible. The line separator (LS) is at a position that is
inconvienient for the requested action.

For any whom this could be helpful to, here is the original phrasing in german:

Springen nicht möglich. Der Zeilenseparator (LS) ist an einer für den
angeforderten Vorgang ungünstigen Stelle.

What does that mean? How can I resolve this problem and debug into the System.Core.dll?

I am working on Windows 7 with Visual Studio 2015, Version 14.0.24720.00 Update 1.

Meera
  • 318
  • 3
  • 16
  • 2
    Tools > Options > Debugging > General > ticking the "Use Managed Compatibility Mode" checkbox is required here. That still doesn't make it very likely that stepping into System.Core is going to work, the reference source server is always behind and right now does not have PDB files for .NET version 4.6.2. Diagnose with the procedure demonstrated in [this post](http://stackoverflow.com/a/27655501/17034). – Hans Passant Nov 11 '16 at 09:31
  • I tried ticking "Use Managed Compatibility Mode" and also, following a link in your link, I tried to "Enable Source Server Support" and unticking "Require source files to exactly match the original version". But the error message still appears as soon as I try to do a step in one of the dll codes, so I cannot even try if stepping in System.Core would work. My C# project is configured to use .NET Framework 4.5.2. – Meera Nov 11 '16 at 10:39
  • 1
    Hard to guess, stop focusing on stepping into System.Core, that's just not very likely to work. You need to be able to debug your own code first. It sounds like the wrong debugging engine is activated after the breakpoint hits, very odd problem. Aggressively eliminate the odds of that happening by *not* using "Auto" for the Debugger Type setting. Use "Managed Only" to debug your C++/CLI and C# code. – Hans Passant Nov 11 '16 at 10:47
  • Thank you for your suggestions, unfortunately even after setting all involved C++ projects to "Managed Only" debugging I still get the error message. – Meera Nov 11 '16 at 11:24
  • I just realised that this problem seems to be related to the one in [here](http://stackoverflow.com/questions/40507709/is-microsoft-sqmclient-the-reason-that-my-program-c-from-c-hangs). When I debug from my small test-native c++ then stepping works fine. This problem only occurs when I debug from that original bigger program. – Meera Nov 11 '16 at 11:55
  • Do you check the option "Enabled .Net Framework source stepping" under TOOLS->Options->Debugging? If other projects work well, do you use the default/same settings? Or you could debug the same app in other VS machine, check it again. – Jack Zhai Nov 12 '16 at 08:06

0 Answers0