Enter a function
Prints the formal parameter names and their respective argument values
Prints a message from within the function
Leaves a function
the function's symbol
the string-callable delegate to use for writing (by default this is a proxy to writeln(string)) the messages to
Example usage of the FuncDebug mixin template using a custom writer delegate
string[] written; void testWriter(string s) { written ~= s; } void myFunc(int x, int y) { mixin FuncDebug!(myFunc, &testWriter); enter(true); say("Good day governor"); leave(); } myFunc(69, 420); assert(written[0] == format("%s(): Enter", "myFunc")); assert(written[1] == "\tx = 69"); assert(written[2] == "\ty = 420"); assert(written[3] == format("%s(): %s", "myFunc", "Good day governor")); assert(written[4] == format("%s(): Leave", "myFunc"));
Function debugging mixin with the given function and the writer to use