### line_trace

Instructs the compiler to emit a call to an external function on each transition to a new source line.

##### Syntax

#pragma line_trace on | off | reset

##### Targets

Intel x86

##### Remarks

Use this pragma to output a log of all executed source lines to enable you to track down difficult errors or act as a statement-level profiler on a line-by-line level.

To make line_trace work you need to write an external function to output the line information. The function should have this signature:

extern "C" void __stdcall _LineTrace( const char *function, int line );

and must save and restore any registers it uses. For example, pushad and popad work for saving and restoring integer registers.

To check this setting, use __option (line_trace). The default setting is off.