I'm using the latest DWScript which has a TdwsDebugger component with it. However I'm not necessarily looking to provide debugging tools to the user - just visually show the current line number.
In the TdwsDebugger component, in its OnDebug event, expr.ScriptPos seems to provide me with this information. But I'm trying to figure out how to make use of this without actually "debugging".
How can I show current DWScript line number without implementing debugging?
When no debugger is active, there is no code actively maintaining any current "line" or other particular execution information, so that information is not available.
Basically, when not debugging, the script execution engine tries to avoid any debugging-related overhead, which includes maintaining current line number or sending debug events notifications.