d_b
There's an issue with your set_global line.
$task = $entry["current_task"];
set_global_property("active_objective", $entry[$task]);
$task will contain the Value..not the Key
For example:
[Key: current_task, Value: Pick Up The Book]
So what you're currently doing with the global property is trying to look up "pick up the Book" in the codex, but that's a value..not a key....the codex is expecting "current_task".
You already have "pick up the Book" inside $task.....that's what $task = $entry["current_task"]
returns.
So you would just set that on the global.
set_global_property("active_objecive", $task);
Now, that may not be the cause of always getting "debug"...but it's going to return null
and could be the cause.
Hope that makes sense lol