0

I am using a .Net Core Console App using Visual Studio 2015 update 2 on windows machine. I am using a package "pack1"(managed code) in this console application which in turn calls native / c code dll. I am able to step into pack1 code, but i am not able to step into my native code.

Tried giving symbol path to native code pdb file , enabled native and managed code compatibility option,tried putting breakpoint into the native c source code directly, also tried to step into c code from managed code, but none of them seem to work.

Can some one please help me with this ?

sample Project.json file :

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true,
    "defines": [ "DEBUG" ]
  },
  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-rc2-3002702"
    },
    "pack1": "1.0.0.0"
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  },
  "configurations": {    "debug": { 
    }
  }
}
  • How did you really add the C project as the reference in your core project? It seems that "Attach to process" window has the Native debugging option in VS IDE and NET Core projects only support referencing .NET framework assemblies. – Jack Zhai Aug 03 '16 at 03:51
  • I have a .Net framework assembly. That has dependency on native code/ c code. i am able to debug the .net framework assembly, but not able to step into the native c code – Prashanth Rao K Aug 03 '16 at 06:26
  • Possible duplicate of [No native code debugging in CoreCLR console application projects in VS2015?](http://stackoverflow.com/questions/31558596/no-native-code-debugging-in-coreclr-console-application-projects-in-vs2015) – Hans Passant Aug 04 '16 at 12:10

1 Answers1

0

Based on this case:

No native code debugging in CoreCLR console application projects in VS2015?

The specific app doesn't support for native debugging in VS IDE now. Think about using the "Attach to process" tool.

Community
  • 1
  • 1
Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
  • i have even tried attach to process and it did not work. Did you try and were you able to succeed ? Can you please share the steps ? – Prashanth Rao K Aug 05 '16 at 05:33
  • Do you get any error? Actually other members asked the same issue here: http://stackoverflow.com/questions/38701204/how-do-i-enable-native-debugging-from-an-asp-net-core-project-in-visual-studio-2, and it works well now, so make sure that it is not the .net Framework version issue or the debug type you enabled in the attach window. – Jack Zhai Aug 05 '16 at 08:51