diff --git a/src/apps/vpn/addons/conditionwatchers/addonconditionwatcherjavascript.cpp b/src/apps/vpn/addons/conditionwatchers/addonconditionwatcherjavascript.cpp index a80ba5d327f..239372f2130 100644 --- a/src/apps/vpn/addons/conditionwatchers/addonconditionwatcherjavascript.cpp +++ b/src/apps/vpn/addons/conditionwatchers/addonconditionwatcherjavascript.cpp @@ -22,7 +22,10 @@ Logger logger("AddonConditionWatcherJavascript"); // static AddonConditionWatcher* AddonConditionWatcherJavascript::maybeCreate( Addon* addon, const QString& javascript) { + logger.debug() << "Attempting to create JavaScript condition watcher from" << javascript; + if (javascript.isEmpty()) { + logger.debug() << "Provided JavaScript file is empty. Ignoring."; return nullptr; } @@ -59,6 +62,7 @@ AddonConditionWatcherJavascript::AddonConditionWatcherJavascript( QJSValue api = engine->newQObject(addon->api()); QJSValue self = engine->newQObject(this); + logger.debug() << "Executing JavaScript condition"; QJSValue output = function.call(QJSValueList{api, self}); if (output.isError()) { logger.debug() << "Execution of the watcher function failed"