C#/ C(managed2unamanged)Visual Studio 2015更新2 .NetCore控制台应用程序1.0,无法调试本机代码调试 [英] C#/C(managed2unamanged)Visual studio 2015 update 2 , .NetCore Console App 1.0 , not able to debug Native Code Debugging

查看:122
本文介绍了C#/ C(managed2unamanged)Visual Studio 2015更新2 .NetCore控制台应用程序1.0,无法调试本机代码调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows机器上使用Visual Studio 2015 Update 2的.Net Core Console App。我在此控制台应用程序中使用了程序包 pack1(托管代码),该程序包又调用了本机/ c代码dll。我可以进入pack1代码,但是无法进入我的本机代码。

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.

尝试提供本机代码pdb文件的符号路径,启用本机和托管代码兼容性选项,尝试将断点直接放入本地c源代码中,也尝试从托管代码进入c代码,但它们似乎都不起作用。

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.

可以有人可以帮我吗?

示例Project.json文件:

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": { 
    }
  }
}


推荐答案

基于这种情况:

在VS2015中,CoreCLR控制台应用程序项目中是否没有本机代码调试?

特定的应用程序现在不支持VS IDE中的本机调试。考虑使用附加到处理工具。

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

这篇关于C#/ C(managed2unamanged)Visual Studio 2015更新2 .NetCore控制台应用程序1.0,无法调试本机代码调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆