bool Debugger::setVar(const UString &ident, const KJSO &value) { if (!eng) return false; const List *chain = Context::current()->pScopeChain(); ListIterator scope = chain->begin(); while (scope != chain->end()) { if (scope->hasProperty(ident)) { if (!scope->canPut(ident)) return false; scope->put(ident, value); return true; } scope++; } // didn't find variable return false; }