Gábor 0 Posted September 11, 2022 Hello! Can someone help me? I would like to know the Line number of source code at runtime. Thanks in advance! Share this post Link to post
Remy Lebeau 1394 Posted September 11, 2022 (edited) C++ has __FILE__ and __LINE__ macros. There is no equivalent in Delphi. Is that what you are asking for? If not, then please clarify your question. Edited September 11, 2022 by Remy Lebeau Share this post Link to post
Gábor 0 Posted September 12, 2022 I would like to scan it in RAD 11, except when handling. Thanks! Share this post Link to post
Remy Lebeau 1394 Posted September 12, 2022 I'm sorry, but I don't understand what you are asking for. Please clarify. Share this post Link to post
Lajos Juhász 293 Posted September 12, 2022 I bet that he wants the call stack for exceptions. (Maybe for multi-platform application. I am guessing, that could be a reason to choose fmx forum as it's the multi platform framework). Share this post Link to post
Gábor 0 Posted September 14, 2022 Exactly. Sorry for my English, I learned it 20 years ago and didn't need to use it! Share this post Link to post
Fr0sT.Brutal 900 Posted September 19, 2022 (edited) https://github.com/Fr0sT-Brutal/Delphi_StackTraces with Ice.Utils.GetCurrentAddress function you can get address of current line in the executable, then launch the app in debugger and use "Goto address". Or at least determine current function with routines from Ice.Debug unit (requires MAP file generated) Edited September 19, 2022 by Fr0sT.Brutal Share this post Link to post
limelect 48 Posted September 22, 2022 (edited) @Fr0sT.Brutal No Ice.Utils.GetCurrentAddress such function in your source now it does Edited September 22, 2022 by limelect Share this post Link to post
Fr0sT.Brutal 900 Posted September 22, 2022 (edited) @limelect https://github.com/Fr0sT-Brutal/Delphi_StackTraces/blob/master/Ice.Utils.pas #645 Edited September 22, 2022 by Fr0sT.Brutal Share this post Link to post
limelect 48 Posted September 22, 2022 (edited) @Fr0sT.Brutalsorry you are correct but Delphi search did not find it now it does Edited September 22, 2022 by limelect Share this post Link to post