是否有一个属性我可以在方法上使用,这样当在调试模式下单步执行某些代码时,调试器会停留在方法的外部?
[DebuggerStepThrough]
(docs)
Not forgetting to add:
using System.Diagnostics;
It's written <DebuggerStepThrough> in VB.NET.
<DebuggerStepThrough>
To use it just put on top of the method like :
<DebuggerStepThrough> Private Sub form_Paint(sender As Object, e As PaintEventArgs) Handles form.Paint ' Picasso End Sub