我想知道是否有一种工具或组件适用于Delphi,可以逐行跟踪方法执行并创建日志文件。使用这种工具,可以通过比较两个日志文件来轻松比较方法在两组输入数据上的表现。
编辑:
假设有一个函数
10: function MyFunction(aInput: Integer): Integer;
11: begin
12: if aInput > 10 then
13: Result := 10
14: else
15: Result := 0;
16: end;
我正在寻找一款工具,能够提供与下面类似的日志:
当输入参数为1时:
Line 10: 'function MyFunction(aInput: Integer): Integer;'
Line 11: 'begin'
Line 12: 'if aInput > 10 then'
Line 15: 'Result := 0;'
Line 16: 'end;'
当aInput参数为11时:
Line 10: 'function MyFunction(aInput: Integer): Integer;'
Line 11: 'begin'
Line 12: 'if aInput > 10 then'
Line 13: 'Result := 10;'
Line 16: 'end;'
这个工具所需的唯一信息是函数名称。
这就像在调试器下逐步执行方法,但以自动方式记录每行代码。