Add function invocation trace in debug mode.