Jump to content
Gábor

Line number of source code at runtime

Recommended Posts

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

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 by Remy Lebeau

Share this post


Link to post

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

 

Exactly. Sorry for my English, I learned it 20 years ago and didn't need to use it!

Share this post


Link to post

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 by Fr0sT.Brutal

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×