如何在我的一行运行时创建一个事件? [英] How create an event that occurs when one line of my runs?
本文介绍了如何在我的一行运行时创建一个事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望在代码的每一行都运行时执行某些操作。例如,添加到目前为止运行的代码行的数量。我可以创建该事件吗?
我不想创建分析器!
I want to do something when every line of my code runs. for example adding the count of line of code that has been run until now.how can i create that event?
I dont want create profiler !
推荐答案
你不能声明一个变量并在每一行之后递增吗?
但你的要求对我来说似乎很奇怪。但你可以做我上面所说的。
Can't you declare one variable and increment that after each line?
But your requirement seems weird to me. But you can do what I said above.
这篇关于如何在我的一行运行时创建一个事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文