As the title says, during a LineCallback when calling GetLineNumber() on the context, it's returning 0 for a line number while filling in the section with a legitimate section name. I suspect this is a constructor call for the script class contained in the script section it references. Is there a way to know for sure whether this represents execution inside a script class constructor? It'd be great if script class constructors had actual line numbers represented by GetLineNumber().
For context, I've built a simple sampling profiler that uses the LineCallback to collect the last executed section/line as the sample to record which is picked up by separate thread that records the last sampled location at a regular interval (100 microseconds). This way I get more sample hits on script lines which call host functions which take more time to execute than ordinary script lines which don't interact with the host.
Anyway, using this profiler I've identified a particular script section with line 0 as a hot path and would like to optimize it but I'm unsure whether line 0 represents execution in a constructor or something else entirely.
Thanks!