File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ component extends="coldbox.system.RestHandler" {
66
66
debuggerService : variables .debuggerService ,
67
67
environment : variables .debuggerService .getEnvironment (),
68
68
profilers : variables .debuggerService .getProfilerStorage (),
69
- currentProfiler : variables .debuggerService .getProfilerStorage ()[ 1 ] ?: {} ,
69
+ currentProfiler : variables .debuggerService .getCurrentProfiler () ,
70
70
manifestRoot : event .getModuleRoot ( " cbDebugger" ) & " /includes"
71
71
}
72
72
);
Original file line number Diff line number Diff line change @@ -246,6 +246,21 @@ component
246
246
return this ;
247
247
}
248
248
249
+ /**
250
+ * Get the current profiler for the current request. Basically the first in the stack
251
+ *
252
+ * @return The current request profiler or an empty struct if none found.
253
+ */
254
+ struct function getCurrentProfiler (){
255
+ var profilers = getProfilerStorage ();
256
+
257
+ if ( arrayLen ( profilers ) ){
258
+ return profilers [ 1 ];
259
+ }
260
+
261
+ return {};
262
+ }
263
+
249
264
/**
250
265
* Get the profiler storage array depending on the storage options
251
266
*/
You can’t perform that action at this time.
0 commit comments