-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdreamweaver.cfm
578 lines (535 loc) · 23.5 KB
/
dreamweaver.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
<cfsilent>
<cfset startTime = getTickCount()>
<cfsetting enablecfoutputonly="Yes">
<cfscript>
formEncoding = getEncoding("FORM");
urlEncoding = getEncoding("URL");
setEncoding("FORM", formEncoding);
setEncoding("URL", urlEncoding);
</cfscript>
<!---
**
* CF5 Debugging Output
*
* Copyright (c) 2001 Macromedia. All Rights Reserved.
* DO NOT REDISTRIBUTE THIS SOFTWARE IN ANY WAY WITHOUT THE EXPRESSED
* WRITTEN PERMISSION OF MACROMEDIA.
--->
<!--- Localized strings --->
<cfset undefined = "">
<!--- Use the debugging service to check options --->
<cftry>
<cfobject action="CREATE" type="JAVA" class="coldfusion.server.ServiceFactory" name="factory">
<cfset cfkdebugger = factory.getDebuggingService()>
<cfset bFoundScopeVars = cfkdebugger.check("Variables")>
<cfcatch type="Any"></cfcatch>
</cftry>
<cfif NOT isDefined("cfkdebugger") OR NOT cfkdebugger.isEnabled()>
<cfthrow message="Please enable debugging in the ColdFusion Administrator when using the Server Debug Mode." type="Dreamweaver Debugger">
</cfif>
<!--- Load the debugging service's event table --->
<cfset qEvents = cfkdebugger.getDebugger().getData()>
<!--- EVENT: SQL Queries --->
<cftry>
<cfquery dbType="query" name="cfdebug_queries" debug="false">
SELECT *, (endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'SqlQuery'
</cfquery>
<cfcatch type="Any"></cfcatch>
</cftry>
<!--- EVENT: Stored Procedures --->
<cftry>
<cfquery dbType="query" name="cfdebug_storedproc" debug="false">
SELECT *, (endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'StoredProcedure'
</cfquery>
<cfcatch type="Any"></cfcatch>
</cftry>
<!--- EVENT: Trace Points --->
<cftry>
<cfquery dbType="query" name="cfdebug_trace" debug="false">
SELECT *, (endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'Trace'
</cfquery>
<cfcatch type="Any"></cfcatch>
</cftry>
<!--- EVENT: Exceptions --->
<cftry>
<cfquery dbType="query" name="cfdebug_ex" debug="false">
SELECT *
FROM qEvents
WHERE type = 'Exception'
</cfquery>
<cfcatch type="Any"></cfcatch>
</cftry>
<!--- EVENT: Total Execution Time --->
<cftry>
<cfquery dbType="query" name="cfdebug_execution" debug="false">
SELECT (endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'ExecutionTime'
</cfquery>
<cfcatch type="Any"></cfcatch>
</cftry>
<cfset totalExecution = 0>
<cfscript>
//UDF - Handle Kojak output of complex data types.
function CFDebugCheckType(variable)
{
var ret = "";
if(IsSimpleValue(variable))
{
ret = variable;
}
else
{
if (IsStruct(variable))
{
ret = ("Struct (" & StructCount(variable) & ")");
}
else if(IsArray(variable))
{
ret = ("Array (" & ArrayLen(variable) & ")");
}
else if(IsQuery(variable))
{
ret = ("Query (" & variable.RecordCount & ")");
}
else
{
ret = ("Complex type");
}
}
return ret;
}
// UDF - tree writing
function dwDrawNode(nTree, indent, id) {
var templateOuput = "";
var thisTemplate = nTree[id].template;
var uri = thisTemplate;
var startToken = "CFC[ ";
var endToken = " | ";
var startTokenIndex = FindNoCase(startToken, thisTemplate, 1);
if( startTokenIndex NEQ 0 ) {
endTokenIndex = FindNoCase(endToken, thisTemplate, startTokenIndex);
uri = Trim(Mid(thisTemplate,Len(startToken),endTokenIndex-Len(startToken)));
}
templateOuput = "<template>#Chr(13)#" &
"<jump_to_line>#Chr(13)#" &
"<file><![CDATA[#uri#]]></file>#Chr(13)#" &
"<uri><![CDATA[#repeatString("- ", indent + 1)##thisTemplate#]]></uri>#Chr(13)#" &
"<line_number><![CDATA[#nTree[id].line#]]></line_number>#Chr(13)#" &
"</jump_to_line>#Chr(13)#" &
"<execution_time><![CDATA[#nTree[id].duration# ms]]></execution_time>#Chr(13)#" &
"</template>#Chr(13)#";
writeOutput(templateOuput);
return "";
}
function dwDrawTree(tree, indent, id) {
var alength = 1;
var i = 1;
var templateOuput = "";
var thisTemplate = Tree[id].template;
var uri = thisTemplate;
var startToken = "CFC[ ";
var endToken = " | ";
var startTokenIndex = FindNoCase(startToken, thisTemplate, 1);
if( startTokenIndex NEQ 0 ) {
endTokenIndex = FindNoCase(endToken, thisTemplate, startTokenIndex);
uri = Trim(Mid(thisTemplate,Len(startToken),endTokenIndex-Len(startToken)));
}
templateOuput = "<template>#Chr(13)#" &
"<jump_to_line>#Chr(13)#" &
"<file><![CDATA[#uri#]]></file>#Chr(13)#" &
"<uri><![CDATA[#repeatString("- ", indent + 1)##thisTemplate#]]></uri>#Chr(13)#" &
"<line_number><![CDATA[#Tree[id].line#]]></line_number>#Chr(13)#" &
"</jump_to_line>#Chr(13)#" &
"<execution_time><![CDATA[#Tree[id].duration# ms]]></execution_time>#Chr(13)#" &
"</template>#Chr(13)#";
writeOutput(templateOuput);
if( isArray( tree[id].children ) and arrayLen( tree[id].children ) ) {
alength = arrayLen( tree[id].children );
for( i = 1; i lte alength; i = i + 1 ) {
if( isArray(tree[id].children[i].children) and arrayLen( tree[id].children[i].children ) gt 0 ) {
dwDrawTree(tree, indent + 1, tree[id].children[i].templateid);
} else {
dwDrawNode(tree, indent + 1, tree[id].children[i].templateid);
}
}
} else {
// single template, no includes?
//dwDrawNode(tree, indent + 1, tree[id].template);
}
return "";
}
</cfscript>
<cffunction name="dwSortedScope" output="false">
<cfargument name="scope">
<cfset retVal="">
<cfset keys = structKeyArray(scope)>
<cfset arraySort(keys,"text")>
<cfloop index="x" from=1 to="#arrayLen(keys)#">
<cfset keyName = keys[x]>
<cfset retVal = retVal & '<variable><name><![CDATA[#keyName#' & ']]></name>' & Chr(13) & Chr(10)>
<cftry>
<cfset keyValue = CFDebugCheckType(scope[keyname])>
<cfcatch>
<cfset keyValue = "undefined">
</cfcatch>
</cftry>
<cfset retVal = retVal & '<value><![CDATA[' & keyValue & ']]></value></variable>' & Chr(13) & Chr(10)>
</cfloop>
<cfreturn retVal>
</cffunction>
</cfsilent>
<cfoutput>
<!-- cf_debug_start
<?xml version="1.0" encoding="UTF-8" ?>
<debug_root>
<general>
<timestamp><![CDATA[#TimeFormat(Now(),"HH:mm:ss.SSS")#]]></timestamp>
<product><![CDATA[#server.coldfusion.productname# #server.coldfusion.productlevel#]]></product>
<product_version><![CDATA[#server.coldfusion.productversion#]]></product_version>
<locale><![CDATA[#GetLocale()#]]></locale>
<user_agent><![CDATA[#CGI.HTTP_USER_AGENT#]]></user_agent>
<remote_ip><![CDATA[#CGI.REMOTE_ADDR#]]></remote_ip>
<host_name><![CDATA[#CGI.REMOTE_HOST#]]></host_name>
<file><![CDATA[#ExpandPath(CGI.Script_Name)#]]></file>
<uri><![CDATA[#CGI.Script_Name#]]></uri>
<cfif IsDefined("cfdebug_execution") AND cfdebug_execution.RecordCount GT 0>
<total_execution_time><![CDATA[#Max(cfdebug_execution.executionTime, 0)# ms]]></total_execution_time>
<cfelse>
<total_execution_time><![CDATA[0 ms]]></total_execution_time>
</cfif>
</general>
<cfif IsDefined("cfdebug_ex") AND cfdebug_ex.RecordCount GT 0>
<exceptions>
<cfloop query="cfdebug_ex">
<cftry>
<exception>
<jump_to_line>
<uri><![CDATA[#cfdebug_ex.template#]]></uri>
<file><![CDATA[#cfdebug_ex.template#]]></file>
<line_number><![CDATA[#cfdebug_ex.line#]]></line_number>
</jump_to_line>
<timestamp><![CDATA[#TimeFormat(Now(),"HH:mm:ss.SSS")#]]></timestamp>
<type><cfif IsDefined("cfdebug_ex.name")><![CDATA[#cfdebug_ex.name#]]></cfif></type>
<message><cfif IsDefined("cfdebug_ex.message") AND cfdebug_ex.message NEQ ""><![CDATA[#cfdebug_ex.message#]]><cfelse><cfif IsDefined("cfdebug_ex.name")><![CDATA[#cfdebug_ex.name#]]></cfif></cfif></message>
<detail><cfif IsDefined("cfdebug_ex.stacktrace")><![CDATA[#cfdebug_ex.stacktrace#]]></cfif></detail>
<error_code><cfif IsDefined("cfdebug_ex.stacktrace.errnumber")><![CDATA[1#cfdebug_ex.stacktrace.errnumber#]]></cfif></error_code>
<extended_info><cfif IsDefined("cfdebug_ex.stacktrace.extendedinfo")><![CDATA[2#cfdebug_ex.stacktrace.extendedinfo#]]></cfif></extended_info>
</exception>
<cfcatch type="Any"></cfcatch>
</cftry>
</cfloop>
</exceptions>
</cfif>
<cfif cfkdebugger.check("Template")>
<template_stack>
<cfquery dbType="query" name="cfdebug_top_level_execution_sum" debug="false">
SELECT sum(endTime - startTime) AS executionTime
FROM qEvents
WHERE type = 'Template' AND parent = ''
</cfquery>
<cfset totalTemplatesTime = 0>
<cfif cfdebug_top_level_execution_sum.recordCount GT 0>
<cfif cfkdebugger.settings.template_mode EQ "tree">
<cfset a = arrayNew(1)>
<cfloop query="qEvents">
<cfscript>
// 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 <cfldap>
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);
}
</cfscript>
</cfloop>
<cfset qTree = queryNew("template,templateId,parentId,duration,line")>
<cfloop index="i" from="1" to="#arrayLen(a)#">
<cfset childidList = "">
<cfset parentidList = "">
<cfloop index="x" from="#arrayLen(a[i].stacktrace.tagcontext)#" to="1" step="-1">
<cfscript>
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);
} else {
parentIdList = listAppend(parentIdList, a[i].stacktrace.tagcontext[x].line);
}
}
</cfscript>
</cfloop>
<cfscript>
// 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 = " | ";
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);
</cfscript>
</cfloop>
<cfset stTree = structNew()>
<cfloop query="qTree">
<cfscript>
// 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);
</cfscript>
</cfloop>
<cfloop query="qTree">
<cfscript>
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);
</cfscript>
</cfloop>
<cfloop query="qTree">
<cfscript>
arrayAppend(stTree[parentId].children, stTree[templateId]);
</cfscript>
</cfloop>
<cfquery dbType="query" name="topNodes" debug="false">
SELECT parentId, template
FROM qTree
WHERE parentId = ''
</cfquery>
<cfloop query="topNodes">
#dwDrawTree(stTree,-1,topNodes.template)#
</cfloop>
<cfelse>
<cfset startToken = "CFC[ ">
<cfset endToken = " | ">
<cfquery dbType="query" name="cfdebug_templates_summary" debug="false">
SELECT template, Sum(endTime - startTime) AS totalExecutionTime, count(template) AS instances
FROM qEvents
WHERE type = 'Template'
group by template
order by totalExecutionTime DESC
</cfquery>
<cfloop query="cfdebug_templates_summary">
<cfset thisTemplate = cfdebug_templates_summary.template>
<cfset startTokenIndex = FindNoCase(startToken, thisTemplate, 1)>
<cfif startTokenIndex EQ 0>
<cfset uri = template>
<cfelse>
<cfset endTokenIndex = FindNoCase(endToken, thisTemplate, startTokenIndex)>
<cfset uri = Trim(Mid(thisTemplate,Len(startToken),endTokenIndex-Len(startToken)))>
</cfif>
<template>
<jump_to_line>
<file><![CDATA[#uri#]]></file>
<uri><![CDATA[#cfdebug_templates_summary.instances# x #cfdebug_templates_summary.template#]]></uri>
</jump_to_line>
<execution_time><![CDATA[#cfdebug_templates_summary.totalExecutionTime# ms]]></execution_time>
</template>
</cfloop>
</cfif>
</cfif>
</template_stack>
</cfif>
<cfif IsDefined("cfdebug_queries") AND cfdebug_queries.RecordCount GT 0
OR IsDefined("cfdebug_cfoql") AND cfdebug_cfoql.RecordCount GT 0
OR IsDefined("cfdebug_storedproc") AND cfdebug_storedproc.RecordCount GT 0>
<database>
<cfif IsDefined("cfdebug_queries") AND cfdebug_queries.RecordCount GT 0>
<sql_queries>
<cfloop query="cfdebug_queries">
<sql_query>
<jump_to_line>
<uri><![CDATA[#cfdebug_queries.template#]]></uri>
<file><![CDATA[#cfdebug_queries.template#]]></file>
<line_number><![CDATA[#cfdebug_queries.line#]]></line_number>
</jump_to_line>
<name><![CDATA[#cfdebug_queries.name#]]></name>
<dsn><![CDATA[#cfdebug_queries.datasource#]]></dsn>
<record_count><![CDATA[#cfdebug_queries.rowcount#]]></record_count>
<cfif IsDefined("cfdebug_queries.response.columnList")>
<column_list><![CDATA[#cfdebug_queries.response.columnList#]]></column_list>
</cfif>
<execution_time><![CDATA[#Max(cfdebug_queries.executionTime, 0)# ms]]></execution_time>
<statement><![CDATA[#cfdebug_queries.body#]]></statement>
</sql_query>
</cfloop>
</sql_queries>
</cfif>
<cfif IsDefined("cfdebug_storedproc") AND cfdebug_storedproc.RecordCount GT 0>
<stored_procs>
<cfloop query="cfdebug_storedproc">
<proc>
<name><![CDATA[#cfdebug_storedproc.name#]]></name>
<dsn><![CDATA[#cfdebug_storedproc.datasource#]]></dsn>
<dbserver><![CDATA[]]></dbserver>
<jump_to_line>
<uri><![CDATA[#cfdebug_storedproc.template#]]></uri>
<file><![CDATA[#cfdebug_storedproc.template#]]></file>
<line_number><![CDATA[#cfdebug_storedproc.line#]]></line_number>
</jump_to_line>
<execution_time><![CDATA[#Max(cfdebug_storedproc.executionTime, 0)# ms]]></execution_time>
<proc_params>
<cfloop index="x" from=1 to="#arrayLen(cfdebug_storedproc.attributes)#">
<cfset thisParam = #cfdebug_storedproc.attributes[cfdebug_storedproc.currentRow][x]#>
<param>
<cfif StructKeyExists(thisParam, "dbVarName")><db_var_name><![CDATA[#thisParam.dbVarName#]]></db_var_name></cfif>
<cfif StructKeyExists(thisParam, "variable")><variable><![CDATA[#thisParam.variable#]]></variable></cfif>
<cfif StructKeyExists(thisParam, "value")><value><![CDATA[#thisParam.value#]]></value></cfif>
<cfif StructKeyExists(thisParam, "resultSet")><result_set><![CDATA[#thisParam.resultSet#]]></result_set></cfif>
<cfif StructKeyExists(thisParam, "maxRow")><max_row><![CDATA[#thisParam.maxRow#]]></max_row></cfif>
<cfif StructKeyExists(thisParam, "type")><type><![CDATA[#thisParam.type#]]></type></cfif>
<cfif StructKeyExists(thisParam, "sqlType")><sql_type><![CDATA[#thisParam.sqlType#]]></sql_type></cfif>
<cfif StructKeyExists(thisParam, "nullAttribute")><null><![CDATA[#thisParam.nullAttribute#]]></null></cfif>
</param>
</cfloop>
</proc_params>
<proc_results>
<cfloop index="x" from=1 to="#arrayLen(cfdebug_storedproc.result)#">
<cfset thisResult = #cfdebug_storedproc.result[cfdebug_storedproc.currentRow][x]#>
<result>
<cfif StructKeyExists(thisResult, "name")><name><![CDATA[#thisResult.name#]]></name></cfif>
<cfif StructKeyExists(thisResult, "resultSet")><result_set><![CDATA[#thisResult.resultSet#]]></result_set></cfif>
<cfif StructKeyExists(thisResult, "maxRow")><max_row><![CDATA[#thisResult.maxRow#]]></max_row></cfif>
</result>
</cfloop>
</proc_results>
</proc>
</cfloop>
</stored_procs>
</cfif>
</database>
</cfif>
<cfif IsDefined("cfkdebugger") AND bFoundScopeVars>
<variables>
<cftry>
<cfif IsDefined("APPLICATION") AND StructCount(APPLICATION) GT 0 AND cfkdebugger.check("ApplicationVar")>
<application>#dwSortedScope(application)#</application>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("CGI") AND StructCount(CGI) GT 0 AND cfkdebugger.check("CGIVar")>
<cgi>#dwSortedScope(cgi)#</cgi>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("CLIENT") AND StructCount(CLIENT) GT 0 AND cfkdebugger.check("ClientVar")>
<client>#dwSortedScope(client)#</client>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("COOKIE") AND StructCount(COOKIE) GT 0 AND cfkdebugger.check("CookieVar")>
<cookie>#dwSortedScope(cookie)#</cookie>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("FORM") AND StructCount(FORM) GT 0 AND cfkdebugger.check("FormVar")>
<form>#dwSortedScope(form)#</form>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("REQUEST") AND StructCount(REQUEST) GT 0 AND cfkdebugger.check("RequestVar")>
<request>#dwSortedScope(request)#</request>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("SERVER") AND StructCount(SERVER) GT 0 AND cfkdebugger.check("ServerVar")>
<server>#dwSortedScope(server)#</server>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("SESSION") AND StructCount(SESSION) GT 0 AND cfkdebugger.check("SessionVar")>
<session>#dwSortedScope(session)#</session>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
<cftry>
<cfif IsDefined("URL") AND StructCount(URL) GT 0 AND cfkdebugger.check("URLVar")>
<url>#dwSortedScope(url)#</url>
</cfif>
<cfcatch type="Any"></cfcatch>
</cftry>
</variables>
</cfif>
<cfif IsDefined("cfdebug_trace") AND cfdebug_trace.RecordCount GT 0>
<trace_path>
<cfset firstTrace=true>
<cfset prevDelta=0>
<cfloop query="cfdebug_trace">
<cfset deltaFromRequest = Val(cfdebug_trace.endTime)>
<cfset deltaFromLast = Val(deltaFromRequest-prevDelta)>
<cftry>
<trace_point>
<jump_to_line>
<uri><![CDATA[#cfdebug_trace.template#]]></uri>
<file><![CDATA[#cfdebug_trace.template#]]></file>
<line_number><![CDATA[#cfdebug_trace.line#]]></line_number>
</jump_to_line>
<timestamp><![CDATA[#TimeFormat(cfdebug_trace.timestamp,"HH:mm:ss.SSS")#]]></timestamp>
<duration>#deltaFromRequest# ms (<cfif firstTrace>1st trace<cfelse>#deltaFromLast# ms</cfif>)</duration>
<type><![CDATA[#cfdebug_trace.priority#]]></type>
<cfif #cfdebug_trace.category# NEQ "">
<category><![CDATA[#cfdebug_trace.category#]]></category>
</cfif>
<cfif #cfdebug_trace.message# NEQ "">
<text><![CDATA[#cfdebug_trace.message#]]></text>
</cfif>
<cfif #cfdebug_trace.result# NEQ "">
<cfset equalSignIndex = Find("=", cfdebug_trace.result, 1)>
<variable>
<name><![CDATA[#Trim(Left(cfdebug_trace.result,equalSignIndex-1))#]]></name>
<value><![CDATA[#Trim(Right(cfdebug_trace.result,Len(cfdebug_trace.result)-equalSignIndex))#]]></value>
</variable>
</cfif>
</trace_point>
<cfcatch type="Any"></cfcatch>
</cftry>
<cfset prevDelta = deltaFromRequest>
<cfset firstTrace=false>
</cfloop>
</trace_path>
</cfif>
</debug_root>
cf_debug_end -->
</cfoutput>
<cfsetting enablecfoutputonly="No">