From b08ef2dcb087676e85478ed6eedfd62a9e7e859b Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Wed, 18 Dec 2024 15:09:18 +0100 Subject: [PATCH] LDEV-3427 restore removed debugging support --- core/src/main/java/lucee/runtime/PageContextImpl.java | 10 ++++++++++ loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/lucee/runtime/PageContextImpl.java b/core/src/main/java/lucee/runtime/PageContextImpl.java index e7a8cfb651..4dfa5087aa 100644 --- a/core/src/main/java/lucee/runtime/PageContextImpl.java +++ b/core/src/main/java/lucee/runtime/PageContextImpl.java @@ -2037,6 +2037,16 @@ public Object getFunction(Object coll, String key, Object[] args) throws PageExc @Override public Object getFunction(Object coll, Key key, Object[] args) throws PageException { + if (config.hasDebugOptions(ConfigPro.DEBUG_TEMPLATE) && !gatewayContext) { + DebugEntryTemplate debugEntry = debugger.getEntry(this, getCurrentTemplatePageSource(), key.toString()); + long currTime = getExecutionTime(); + long time = System.nanoTime(); + Object result = variableUtil.callFunctionWithoutNamedValues(this, coll, key, args); + long diff = ((System.nanoTime() - time) - (getExecutionTime() - currTime)); + setExecutionTime(getExecutionTime() + diff); + debugEntry.updateExeTime(diff); + return result; + } return variableUtil.callFunctionWithoutNamedValues(this, coll, key, args); } diff --git a/loader/build.xml b/loader/build.xml index 3a198ac064..afaad34cdb 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index f0e14bd5bc..d3d1be7545 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.2.0.229-SNAPSHOT + 6.2.0.230-SNAPSHOT jar Lucee Loader Build