Vely logo Empower C
install  tutorials  examples
documentation  license  about

12.1.0 released on Sep 19, 2022



Emit trace.


trace-run [ <format>, <expression> [ , ... ] ]


trace-run formats a tracing message according to the <format> string and a list of variable-type <expression>s (in the same way C's printf() does) and then writes the result into current process' trace_file (if enabled, see vv) without any encoding (meaning a string is output exactly as it is).

trace-run can be used without any clauses, in which case a location (file name and line number) is recorded in the trace file - this is useful when you only want to know if the execution passed through code.

If trace-run has any other clauses, then <format> string must be present and there must be at least one <expression> (it means if you want to trace a simple string literal you still have to use "%s" as format).

For tracing to have effect, tracing must be enabled (see vv). For location of trace files, see how_vely_works.


// Trace information
trace-run "Program wrote %lld bytes into file %s", num_bytes, file_name

// Trace that program execution passed through here

See tutorial-hello_world for an example in debugging and tracing.


Debugging ( debugging   trace-run  )  SEE ALL (documentation)

Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Icons copyright PaweĊ‚ Kuna licensed under MIT. This web page is licensed under CC-BY-SA-4.0.