Definition: |
with trace
trace(integer i) |
Description: | If i is 1 or 2, turn on full-screen interactive statement tracing/debugging.
If i is 3, turn on tracing of statements to a file called
ctrace.out.
If i is 0, turn off tracing. When i is 1 a color display appears.
When i is 2 a monochrome trace display appears.
Tracing can only occur in routines that were
compiled
with trace
, and trace() has no effect unless it is
executed in a
with trace
section of your program.
See Debugging for a full discussion of tracing / debugging. |
Comments: | Use trace(2) if the color display is hard to view on your system.
trace(3) is supported by the Euphoria To C Translator. Interactive tracing is not supported with the Translator.
The trace() function is only available during interpretation; it is not and cannot be part of a compiled application, other than in p[w].exe. Any thoughts of "trace a compiled application" suggest that there is a behavioural discrepancy (between compilation and interpretation) which should be directly addressed as a bug in phix. I know of no such cases, but it is only reasonable to expect one to crop up every now and again, hopefully occuring quite rarely and promptly fixed. Tracing does not apply to inline assembly (#ilASM{}), only hll code. |
Example: |
if x < 0 then -- ok, here's the case I want to debug... trace(1) -- etc. ... end if |
See Also: | profile, debugging and profiling |
