Mix strings with numbers on Eval Expression of Breakpoints on Delphi

breakpoints, conditional-statements, delphi, logging

Solution

Just use:

Name + ':' + IntToStr(Id)

Problem

I'm using Delphi XE2. And I would like to able to log data using the Delphi Breakpoints. Ex: Format('%s:%d', [Name, Id]) When I try this, it doesn't recognizes Format. I didn't found any details on Delphi Help on how to do it. The big benefit of using Delphi Breakpoints without break option, is that I don't need to recompile to log more data, over the traditional code logging. Since, this data its very temporary, and I'm using only to locate a bug, and once its found its no longer needed. This real-time facility its very helpful, if allows me to log more than one variable.

Original source