Custom Stack Trace Points - Mura Docs v7.0

Custom Stack Trace Points

As a Mura developer, you may add your own custom messages to the stack trace output. This is useful for inspecting how long it takes for your custom code to execute, quickly and easily.

The example below illustrates how to add your own trace point(s).

<!--- Place this either at the top of your file, or at the beginning of a block of code you wish to trace --->
<cfset myTracePoint = $.initTracePoint('your filename, method name, or other description to identify this trace point goes here ... this is what will output in the Stack Trace') />
<!--- file content or block of code goes here --->
<!--- Place this either at the bottom of your file, or at the end of a block of code you wish to trace --->
<cfset m.commitTracePoint(myTracePoint) />

This is an example stack trace output, using the above code in the footer.cfm layout template of the default theme.