profile line by line

I recently tried using the code profiler, which does give some good information. However, its usefulness would be greatly increased if the profiler listed line by line execution counts and times rather than listing only counts and times for entire functions. So, I’m wondering, am I missing something and there is currently a way to get line by line information? Or, if not, are there any plans to implement this?

The profiler only measures full methods.

[quote=241325:@Kevin Clark]I recently tried using the code profiler, which does give some good information. However, its usefulness would be greatly increased if the profiler listed line by line execution counts and times rather than listing only counts and times for entire functions. So, I’m wondering, am I missing something and there is currently a way to get line by line information?
[/quote]
You’re not missing anything

We’ve discussed possible alterations to profiling
But there are no plans to do this

Do you have an example of why you need that feature ?

Michel, for quite a few years I have maintained a large database program in Visual Foxpro (VFP). VFP has a coverage profiler which shows you the execution count and time of every line. On many occasions I have found it to be extraordinarily helpful, especially in a situation where I am trying to optimize a loop which is run hundreds or thousands of times.

If you are trying to optimize a particular part of your code, especially loops, you can use System.Debuglog together with Microseconds to get the data you are looking for.

The Profiler also changes threading behavior subtly (I believe profiled code may have some yield points that non-profiled code lacks). If I have some free time I’ll write this up as a Feedback. This is more art than science.

And +1 to the use of microseconds & DebugLog : nothing beats knowing how long something took in an actual (non-debug, non-profiled) app.