在 Visual Studio 中,当您在调试时跨过一行时,您会得到以下信息:
我似乎在 Rider 中找不到类似的东西。有类似的吗
根据我原来问题的评论,此功能尚未实现
作为解决方法,如果我真的需要知道经过的时间,我只是使用秒表。
示例:
var sw = new Stopwatch(); sw.Start(); // Code you care about goes here sw.Stop(); // Put breakpoint here, then use debugger to look at sw.ElapsedMilliseconds