Does Lazarus have file name and line number macros for inserting into DebugLn/WriteLn statements?
Mailing lists / lazarus / 2011-10
Does Lazarus have file name and line number macros for inserting into DebugLn/WriteLn statements?
8 messages · 4 people · –
- FFrank Church 4
- VVincent Snijders 2
- HHoward Page-Clark 1
- LLukasz Sokol 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
2011/10/6 Frank Church :
Does Lazarus have file name and line number macros for inserting into DebugLn/WriteLn statements?
No.
But FPC has:
http://www.freepascal.org/docs-html/prog/progsu38.html#x44-430001.1.38
Vincent
Vincent Snijders wrote 12 lines
Thanks,
all that remains is the name of the current procedure :)
Show quoted text 6 lines
Frank Church wroteall that remains is the name of the current procedure :)
There is already $ProcedureName() you can use in a code template (see Tools->Code Templates).
H
Howard Page-Clark wrote 11 lines
I am using 0.9.30 and it is not on the menu. Do you have an example of the syntax to be used in source code?
Show quoted text 9 lines
I am using 0.9.30 and it is not on the menu. Do you have an example of the syntax to be used in source code?
In the source editor type d + CTRL +j.
Vincent
I am using 0.9.30 and it is not on the menu. Do you have an example of the syntax to be…
Frank Church wrote 12 lines
On my Lazarus therre is Environment -> Code Templates, but yes there is no $ProcedureName() in the default Lazarus.dci (C:\lazarus\ide\lazarus_dci_file.dci, as installed from the zipped installer) - d+[Ctrl+j] expands to debugln(['test ']);
Lukasz
-- Frank Church
Lukasz Sokol wrote 23 lines
I have tried Vincent's suggestion and it is working, I get TObjectType.ProcedureName
