如何激活/使用 JIT 调试? [英] How do I activate/use JIT-Debugging?

查看:65
本文介绍了如何激活/使用 JIT 调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 C# 中使用 monogame(版本 3.7.1)制作了一个游戏,并尝试在 Visual Studio 2017 中发布它.发布工作正常,但在那之后,我尝试执行 setup.exe 文件,但不幸的是,我得到了一个NullReferenceException 问题是我不知道如何调试并找出导致错误的原因.

I made a game with monogame (version 3.7.1) in C# and tried to publish it in Visual Studio 2017. The publishing worked fine but after that, I tried to execute the setup.exe file but unfortunately, I get a NullReferenceException the problem is I don't know how to debug and find out what's causing the error.

最后,它声明您可以通过激活 JIT-Debugging 来激活调试.我已经通过写下一行来做到这一点:

At the end, it states you can activate debugging by activating JIT-Debugging. I already have done that by writing the line:

< system.windows.forms jitDebugging="true" />

进入配置下的machine.config文件,但现在我不知道如何使用它,因为当我运行.exe时它仍然给我NullReferenceException错误并且我在互联网上没有找到任何线索如何使用它.

Into the machine.config file under the configuration, but now I don't know how to use it because when I run the .exe it stills gives me the NullReferenceException error and I didn't find any clue on the internet how to use it.

推荐答案

在 VS 中设置 JIT 调试器的步骤结束于:https://docs.microsoft.com/en-us/visualstudio/debugger/debug-using-the-just-in-time-debugger?view=vs-2017

The steps for setting up the JIT debugger in VS are over at: https://docs.microsoft.com/en-us/visualstudio/debugger/debug-using-the-just-in-time-debugger?view=vs-2017

对于任何 .NET 应用程序中任何未处理的 .NET 异常,JIT 调试器都会弹出.当然,要调试应用程序,您需要有源代码和符号,而调试零售/发布位则更加困难.

The JIT debugger will pop for any unhandled .NET exception in any .NET app. Of course to debug an app you will need to have source and symbols, and debugging retail/release bits is more difficult.

这篇关于如何激活/使用 JIT 调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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