Debugging Information
| #server.coldfusion.productname# #server.coldfusion.productlevel# |
#server.coldfusion.productversion# |
| Template |
#xmlFormat(CGI.Script_Name)# |
| Time Stamp |
#DateFormat(Now())# #TimeFormat(Now())# |
| Locale |
#GetLocale()# |
| User Agent |
#EncodeForErrorSmart(CGI.HTTP_USER_AGENT)# |
| Remote IP |
#EncodeForErrorSmart(CGI.REMOTE_ADDR)# |
| Host Name |
#EncodeForErrorSmart(CGI.REMOTE_HOST)# |
SELECT (endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'ExecutionTime'
queryAddRow(cfdebug_execution);
querySetCell(cfdebug_execution, "executionTime", "-1");
SELECT sum(endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'Template' AND parent = ''
Execution Time
// only want templates, IMQ of SELECT * ...where type = 'template' will result
// in cannot convert the value "" to a boolean for cachedquery column
// SELECT stacktrace will result in Query Of Queries runtime error.
// Failed to get meta_data for columnqEvents.stacktrace .
// Was told I need to define meta data for debugging event table similar to
if( qEvents.type eq "template" ) {
st = structNew();
st.StackTrace = qEvents.stackTrace;
st.template = qEvents.template;
st.startTime = qEvents.starttime;
st.endTime = qEvents.endtime;
st.parent = qEvents.parent;
st.line = qEvents.line;
arrayAppend(a, st);
}
if( a[i].stacktrace.tagcontext[x].id NEQ "CF_INDEX" ) {
// keep appending the line number from the template stack to form a unique id
childIdList = listAppend(childIdList, a[i].stacktrace.tagcontext[x].line);
if( x eq 1 ) {
//parentIdList = listAppend(parentIdList, a[i].stacktrace.tagcontext[x].template);
raw_trace = a[i].stacktrace.tagcontext[x].raw_trace;
findFunctionPrefix = "$func"; // set prefix to account for length and position since CF doesn't have RegEx lookbehind assertion
findFunction = ReFindNoCase("(?=\" & findFunctionPrefix & ").*(?=\.runFunction\()",raw_trace,1,true);
if( findFunction.len[1] NEQ 0 AND findFunction.pos[1] NEQ 0 ) {
// get function name from raw_trace to allow for proper application.cfc tree rendering
parentfunction = Trim(Mid(raw_trace, findFunction.pos[1] + Len(findFunctionPrefix), findFunction.len[1] - Len(findFunctionPrefix)));
// append the function name (pulled from raw_trace) to the cfc template for tree root comparison.
parentIdList = listAppend(parentIdList, a[i].stacktrace.tagcontext[x].template & " | " & lcase(parentfunction));
}
else {
parentIdList = listAppend(parentIdList, a[i].stacktrace.tagcontext[x].template);
}
} else {
parentIdList = listAppend(parentIdList, a[i].stacktrace.tagcontext[x].line);
}
}
// template is the last part of the unique id...12,5,17,c:\wwwroot\foo.cfm
// if we don't remove the "CFC[" prefix, then the parentId and childId relationship
// will be all wrong
startToken = "CFC[ ";
//endToken = " | ";
endToken = "(";
thisTemplate = a[i].template;
startTokenIndex = FindNoCase(startToken, thisTemplate, 1);
if( startTokenIndex NEQ 0 ) {
endTokenIndex = FindNoCase(endToken, thisTemplate, startTokenIndex);
thisTemplate = Trim(Mid(thisTemplate,Len(startToken),endTokenIndex-Len(startToken)));
}
childIdList = listAppend(childIdList, thisTemplate);
queryAddRow(qTree);
querySetCell(qTree, "template", a[i].template);
querySetCell(qTree, "templateId", childIdList);
querySetCell(qTree, "parentId", parentIdList);
querySetCell(qTree, "duration", a[i].endtime - a[i].starttime);
querySetCell(qTree, "line", a[i].line);
// empty parent assumed to be top level with the exception of application.cfm
if( len(trim(parentId)) eq 0 ){
parentId = 0;
}
stTree[parentId] = structNew();
stTree[parentId].templateId = qTree.templateId;
stTree[parentId].template = qTree.template;
stTree[parentId].duration = qTree.duration;
stTree[parentId].line = qTree.line;
stTree[parentId].children = arrayNew(1);
stTree[templateId] = structNew();
stTree[templateId].templateId = qTree.templateId;
stTree[templateId].template = qTree.template;
stTree[templateId].duration = qTree.duration;
stTree[templateId].line = qTree.line;
stTree[templateId].children = arrayNew(1);
arrayAppend(stTree[parentId].children, stTree[templateId]);
SELECT parentId, templateid
FROM qTree
WHERE parentId = ''
#drawTree(stTree,-1,topNodes.templateid,cfdebugger.settings.template_highlight_minimum)#
(#time_other# ms) STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN
(#cfdebug_execution.executionTime# ms) TOTAL EXECUTION TIME
red = over #cfdebugger.settings.template_highlight_minimum# ms execution time
SELECT template, Sum(endTime - startTime) AS totalExecutionTime, count(template) AS instances
FROM qEvents
WHERE type = 'Template'
group by template
order by totalExecutionTime DESC
| Total Time |
Avg Time |
Count |
Template |
" & template & "">
">
">
">
">
">
">
| #totalTime# ms |
#encodeForErrorSmart(totalExecutionTime)# ms |
#templateAverageTime# ms |
#encodeForErrorSmart(instances)# |
#templateOutput# |
| #encodeForErrorSmart(time_other)# ms | |
STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN |
| #encodeForErrorSmart(cfdebug_execution.executionTime)# ms | |
TOTAL EXECUTION TIME |
red = over #cfdebugger.settings.template_highlight_minimum# ms average execution time
Execution Time
No top level page was found.
Exceptions
#TimeFormat(cfdebug_ex.timestamp, "HH:mm:ss.SSS")# - #cfdebug_ex.name# Exception - in #encodeForErrorSmart(cfdebug_ex.template)# : line #encodeForErrorSmart(cfdebug_ex.line)#
#encodeForErrorSmart(cfdebug_ex.message)#
ORM SQL Queries
#htmleditformat(cfdebug_orm_queries.body)#
SQL Queries
#cfdebug_queries.name# (Datasource=#cfdebug_queries.datasource#, Time=#Max(cfdebug_queries.executionTime, 0)#ms, Records=#Max(cfdebug_queries.rowcount, 0)#, Records=#cfdebug_queries.result.recordCount#, Cached Query) in #cfdebug_queries.template# @ #TimeFormat(cfdebug_queries.timestamp, "HH:mm:ss.SSS")#
#htmleditformat(cfdebug_queries.body)#
Query Parameter Value(s) -
Parameter ###x#(#thisParam.sqlType#) = #htmleditformat(thisParam.value)#
Stored Procedures
#cfdebug_storedproc.name# (Datasource=#cfdebug_storedproc.datasource#, Time=#Max(cfdebug_storedproc.executionTime, 0)#ms) in #cfdebug_storedproc.template# @ #TimeFormat(cfdebug_storedproc.timestamp, "HH:mm:ss.SSS")#
| |
| parameters |
type | CFSQLType | value | variable | dbVarName |
#encodeForErrorSmart(thisParam.type)# |
#encodeForErrorSmart(thisParam.sqlType)# |
#htmleditformat(thisParam.value)# |
#encodeForErrorSmart(thisParam.variable)# = #CFDebugSerializable(thisParam.variable)# |
#encodeForErrorSmart(thisParam.dbVarName)# |
|
| |
| resultsets |
name | resultset |
#thisParam.name# |
#thisParam.resultSet# |
|
CFTimer Times
[#val(cfdebug_timer.endTime) - val(cfdebug_timer.startTime)#ms] #encodeForErrorSmart(cfdebug_timer.message)#
Trace Points
[#TimeFormat(cfdebug_trace.timestamp, "HH:mm:ss.lll")# #cfdebug_trace.template# @ line: #cfdebug_trace.line#] [#deltaFromRequest# ms (1st trace#deltaFromLast# ms)] - [#cfdebug_trace.category#] [#cfdebug_trace.result#] #cfdebug_trace.message#
Scope Variables
Application Variables:
#sortedScope(application)#
CGI Variables:
#sortedScope(cgi)#
Client Variables:
#sortedScope(client)#
Cookie Variables:
#sortedScope(cookie)#
Form Fields:
#sortedScope(form)#
Request Parameters:
#sortedScope(request)#
Server Variables:
#sortedScope(server)#
Session Variables:
#sortedScope(session)#
URL Parameters:
#sortedScope(url)#
Debug Rendering Time: #duration# ms
|