Debug.Write不工作 [英] Debug.Write not working

查看:178
本文介绍了Debug.Write不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,在调试类突然停止工作对我来说。

For some reason, the Debug class suddenly stopped working for me.

public void WhyDebugIsNotWorking()
{
     Debug.Write("Why am I not working !!!!!!");
}

在上面的行, Debug.Write 变暗淡(我认为ReSharper的是调光的话),当​​我把光标放在它,它说:

On the above line, Debug.Write gets dim (I think Resharper is dimming it) and when I put the cursor on it, it says:

方法调用被跳过。编译器不会生成方法调用,因为该方法是有条件的,或者是不执行的部分方法。

Method invocation is skipped. Compiler will not generate method invocation because the method is conditional, or it is a partial method without implementation.

无上述条件为真,在我的情况。正如你可以看到这是一个非常简单的例子。我不能使用Debug类的。请帮帮忙!

None of the above conditions are true in my case. As you can see it's a very simple case. I'm not able to use Debug class at all. Please help!

推荐答案

您还没有设置您的构建配置了DEBUG变量。 (有一个复选框,设置定义DEBUG常数)

You did not set the DEBUG variable in your build configuration. (there is a checkbox to set "Define DEBUG constant")

这篇关于Debug.Write不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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