Feature request for IDE: CurrentLineNumber

They way I handle this is just to have a variable which I update at key points of code execution.
There are whole swathes of code that can never cause me trouble.

So just before some code block, i set a global integer variable to a number.
It doesnt need to be a line number: its a sequence number

[code]debugsection = 1

//some code

debugsection = 2

//some more code
[/code]

If a routine drops into an exception handler, I know the routine name, and I know the last section number reached without error.
the error then lies between the debugsection reported by the handler, and the next one.
That costs maybe 100 bytes per method, and is totally under my control

If I want more expressive handling and dont care about file size, I can make the variable into a string and use words instead.

Like @Jeff Tullin I tend to call routines with a location ID. It would seem that having a line number would lock your code to a very specific version - add a comment at the top of the routine and all those line numbers from previous builds become useless.

For years, back in the eighties, I coded with line numbers.

The arrival of QuickBasic was such a liberation from line numbers, where subroutines were simply accessed by a label, I never looked back.

When I need to monitor execution, I simply use CurrentMethodName, or if I want to know all methods execution, I use a break and the stack will tell me a lot more.