Delphi Tracing Tool

I was wondering if there is a tool or component for Delphi that can track the execution of a method line by line and create a log file. Using such a tool, it is easy to compare how a method performs two sets of input by comparing two log files.

EDIT:

Let, say, there is a function

10: function MyFunction(aInput: Integer): Integer; 11: begin 12: if aInput > 10 then 13: Result := 10 14: else 15: Result := 0; 16: end; 

I am looking for a tool that will give a log that will look like the following:

When aInput parameter is 1:

 Line 10: 'function MyFunction(aInput: Integer): Integer;' Line 11: 'begin' Line 12: 'if aInput > 10 then' Line 15: 'Result := 0;' Line 16: 'end;' 

and when aInput parameter is 11:

 Line 10: 'function MyFunction(aInput: Integer): Integer;' Line 11: 'begin' Line 12: 'if aInput > 10 then' Line 13: 'Result := 10;' Line 16: 'end;' 

The only information that the tool should need is the name of the function.

He likes to go through the method under the debugger, but automatically, writing down each line of code.

+4
source share
5 answers

After some time searching, I can conclude that there is no such tool for Delphi.

0
source

SmartInspect and CodeSite

You can read this issue to learn more about this and other.

+2
source

If you are looking for a free solution, I used TraceTool before . The viewer is written in Delphi, and you can also use TraceTool with C #, C ++, ActiveX, and Java. With Delphi, you simply include a couple of auxiliary blocks and add related entries when you go. It supports logging, as well as objects and their data.

You can download it from SourceForge here .

alt text

Or, if you need something simpler and easier to just output the string, you can always use the OutputDebugString and view the output with the TraceTool viewer or with the DbgView from SysInternals.

+2
source

Perhaps the "delphi profiler" will be useful. There are many suggestions in stackoverflow.

Depending on the profiler, you will find out what percentage of aInput goes through each part of the if-then-else in your example and how long it takes to go through each section. Many profilers have registration. For example, smartInspect., But I have not tried.

0
source

Maybe you can do this (in part) with "Delphi code coverage"? (traces whose lines are executed and which are not) http://code.google.com/p/delphi-code-coverage/

0
source

All Articles