如何使用MessageBox的输出调试信息 [英] How to use messagebox to output debug information

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

问题描述

我使用一个MessageBox尝试做一些手工调试,这就是我全部都拿出了,我怎么做工作?



 私人无效DisplayMessageBoxText()
{
MessageBox.Show(警报信息);
}


解决方案

香港专业教育学院使用的 = http://www.gurock.com/smartinspect/相对=nofollow> http://www.gurock.com/smartinspect/ 了很多,它非常适合记录各种变化,可以抓取各种的对象,状态等。积极的一面是,你可以把它留在你的代码,如果以后有问题,只需连接在听者看看发生了什么。



抛出消息框也可能会打断你的程序,因为你是改变重点,具体情况取决于在你的应用程序发生错误,例如,如果它的一个焦点/密钥类型的问题,你就可以有更多的代码发生的无焦点/重新聚焦类型的消息得到处理。


I am using a MessageBox to try and do some manual debugging and this is all i have come up with, how am I supposed to make it work?

private void DisplayMessageBoxText()
        {
            MessageBox.Show("Alert Message");
        }

解决方案

Ive used http://www.gurock.com/smartinspect/ a lot, its great for logging various changes, can grab all sorts of objects, statuses and the like. the plus side is you can leave it in your code and if you have problems later, just connect in the listener and see whats happening.

throwing message boxes could also interrupt your program, as you are changing focus, depending on where the error occurs in your app, such as if its a focus/key type problem, you can then have more code happening as the unfocus/refocus type messages get processed.

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

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