Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "traceon"
From Quake Wiki
(New page: === Function: traceon === void traceon() Start tracing functions, end them with traceoff()) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | ''void'' '''traceon'''() | |
− | |||
− | + | == Usage == | |
+ | Starts printing the statements the VM is executing to the console. Useful for debugging code to see what exact steps it's taking. Paired with <code>traceoff()</code> to disable statement printing. | ||
+ | |||
+ | == Example == | ||
+ | // Verify which path the code is executing at a branch | ||
+ | traceon(); | ||
+ | if (self.count == 3) | ||
+ | PerformTask2(); | ||
+ | else | ||
+ | PerformTask(); | ||
+ | traceoff(); |
Latest revision as of 18:43, 31 July 2023
void traceon()
Usage[edit]
Starts printing the statements the VM is executing to the console. Useful for debugging code to see what exact steps it's taking. Paired with traceoff()
to disable statement printing.
Example[edit]
// Verify which path the code is executing at a branch traceon(); if (self.count == 3) PerformTask2(); else PerformTask(); traceoff();