让调试器在下一个点击事件中中断 [英] getting the debugger to break at the next click event

查看:31
本文介绍了让调试器在下一个点击事件中中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个有 100 多个表单的 .net windows 表单项目中,所有这些表单都有无数涉及基类的自定义控件,我很难知道特定按钮在哪里,我的意思是表单名称是什么我在运行应用程序时正在查看,以及我刚刚单击的按钮的代码中按钮单击事件的确切位置.Visual Studio 中是否有调试功能,它只会将我的执行中断到单击发生的那一行.我可以告诉 VS 在下一个 Click 事件发生时中断吗?(这些天运行 Visual Studio 2012/13).

in a .net windows forms project which has 100s of forms, and all those forms has countless custom made controls with base classes involved, its very difficult for me to know where a particular button is, i mean whats the form name which I'm looking at while i'm running the application, and where exactly is the button click event, in code, of the button that I just clicked. Is there a debugging feature in Visual Studio, which would just break the execution for me to the line where the click happened. Can I tell VS to break at which ever Click event comes next? (running visual studio 2012/13 these days).

谢谢.

推荐答案

就在您单击程序中的按钮之前执行以下操作:

Just before you click the button in the program do this:

转到visual studio并暂停程序.只需按下暂停按钮.然后按 F11(进入).

Go to visual studio and pause the program. Just press the pause button. Then press F11 (Step Into).

现在按下程序中的按钮,您应该进入事件处理程序.

Now press the button in the program, and you should be taken into the event handler.

这篇关于让调试器在下一个点击事件中中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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