设置DebuggerStepThrough属性,使单步跟踪跳过指定函数。
2008-07-16 14:48
260 查看
DebuggerStepThrough属性能使单步跟踪在制指定的函数失效。如:
private void button1_Click(object sender, EventArgs e)
{
myMethod();
}
//设置单步跟踪失效的属性
[System.Diagnostics.DebuggerStepThrough]
private void myMethod()
{
Console.WriteLine("Is this method executed?");
}
上面的代码中,单步跟踪(F11)的时候不能进入myMethod函数。但是如果里面有断点,将直接走向断点处。
private void button1_Click(object sender, EventArgs e)
{
myMethod();
}
//设置单步跟踪失效的属性
[System.Diagnostics.DebuggerStepThrough]
private void myMethod()
{
Console.WriteLine("Is this method executed?");
}
上面的代码中,单步跟踪(F11)的时候不能进入myMethod函数。但是如果里面有断点,将直接走向断点处。
相关文章推荐
- 设置DebuggerStepThrough属性,使单步跟踪跳过指定函数
- DebuggerStepThrough属性
- DebuggerStepThrough属性
- 批处理自动设置指定文件/文件夹属性
- CSS---属性选择器:对带有指定属性的Html元素设置样式
- 反射_通过反射写一个通用的设置某个对象的某个属性为指定的值
- c++中调用QML中的函数和设置QML中的属性的问题
- QML与c++交互学习笔记(八) qt c++直接调用QML中的函数, 直接设置属性
- 学习点滴积累之System.Diagnostics.DebuggerStepThrough
- 【Android常用控件】EditText常用属性【二】:为文本输入框指定软键盘类型和软键盘回车键图标设置
- 原生JS获取和设置指定属性
- 用addOnload()函数设置多重onload属性
- Android设置布局参数,addView添加布局时指定控件属性
- Asp.net_设置Button属性跳过控件验证
- 通过android:onClick属性设置click监听函数
- gdb使用指南:单步执行和跟踪函数调用
- 学习点滴积累之System.Diagnostics.DebuggerStepThrough
- 设置iframe指定页面某控件属性
- 1、怎样设置C#OpenFileDialog(文件选择窗体)的指定路径、文件格式等属性(设置打开默认路径、文件格式、窗体显示文本)
- Flex中如何利用dataDescriptor和labelFunction属性,以及hasChildren()和getChildren()函数设置Tree中包含子节点个数