Core20R在VS2015中的控制台应用程序项目中没有本机代码调试? [英] No native code debugging in CoreCLR console application projects in VS2015?

查看:130
本文介绍了Core20R在VS2015中的控制台应用程序项目中没有本机代码调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的想跳过所有的CoreCLR。新的项目结构,将nuget合并到构建系统中,文件系统报告更改时自动刷新解决方案以及多个平台的目标只是我要从旧的csproj / .net中移动的一些原因4.x的东西。



我的主要用例之一是用C#探索多平台游戏引擎设计,但是有一些interop涉及到特定的平台(隐藏在SharpDX在我的案例) - 如果您在项目的调试选项中启用本机代码调试,则调试来自DirectX的非托管端的消息从本机代码冒泡到托管代码。 CoreCLR项目在项目的调试设置中没有这个选项,这意味着没有有用的调试消息,这意味着调试DirectX调用是噩梦。



我会欣赏一些了解这方面的情况。

解决方案

该工具在从VS运行时不支持本机调试。但是,如果将调试器手动附加到进程,请选择本机和CoreClr(该选项位于调试 - >附加到进程),您将实现所需的。



如果您使用 dnx ,那么您可以在应用程序启动时传递 - debug 标志,类似于这个:



dnx --debug。运行< args>



,它将等待附加本机调试器。


$ b $请注意:如果您通过 - debug ,则必须附加本机调试器。您不能仅附加被管理的。


I really want to jump all over CoreCLR. The new project structure, the merging of nuget into the build system, the automatic refreshing of solutions when the file system reports changes, and the targeting of multiple platforms are just some of the reasons I want to move on from the old csproj/.net 4.x stuff.

One of my primary use cases is exploring multiplatform game engine design with C#, but there's some interop involved for specific platforms (hidden away in SharpDX in my case) - debug messages that come from the unmanaged side of DirectX bubble up from native code into managed code if you "enable native code debugging" in the project's debug options. CoreCLR projects don't have that option though in the project's debug settings, which means no useful debug messages, which means debugging DirectX calls is nightmarish.

I'd appreciate some insight into what's going on in this regard.

解决方案

The tooling doesn't have support for native debugging when running from VS. However, if you attach the debugger manually to the process, select both native and CoreClr (the option is in Debug -> Attach to Process) and you'll achieve what you want.

If you are using dnx then you can pass the --debug flag when the app starts, similar to this:

dnx --debug . run <args>

and it will wait for the native debugger to be attached.

PS: Caveat: if you pass --debug you must attach a native debugger. You cannot attach only the managed one.

这篇关于Core20R在VS2015中的控制台应用程序项目中没有本机代码调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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