diff --git a/tooling/agent/debugger_impl.cpp b/tooling/agent/debugger_impl.cpp index a771ca70582f5e3eb099e43c015e47e269a0052c..1cfcd518d452eed4be947496cb0282ba2c3eb1e0 100644 --- a/tooling/agent/debugger_impl.cpp +++ b/tooling/agent/debugger_impl.cpp @@ -1378,6 +1378,7 @@ void DebuggerImpl::GetClosureVariables(const FrameHandler *frameHandler, LocalGetJSThread(); JSHandle envHandle = JSHandle(thread, DebuggerApi::GetEnv(frameHandler)); + JSMutableHandle valueHandle = JSMutableHandle(thread, JSTaggedValue::Hole()); JSTaggedValue env = envHandle.GetTaggedValue(); if (env.IsTaggedArray() && DebuggerApi::GetBytecodeOffset(frameHandler) != 0) { LexicalEnv *lexEnv = LexicalEnv::Cast(env.GetTaggedObject()); @@ -1394,8 +1395,8 @@ void DebuggerImpl::GetClosureVariables(const FrameHandler *frameHandler, LocalGetLength() - LexicalEnv::RESERVED_ENV_LENGTH); - Local value = JSNApiHelper::ToLocal( - JSHandle(thread, lexEnv->GetProperties(slot))); + valueHandle.Update(lexEnv->GetProperties(slot)); + Local value = JSNApiHelper::ToLocal(valueHandle); if (varName == "this") { if (thisVal->IsHole()) { LOG_DEBUGGER(INFO) << "find 'this' in current lexical env"; diff --git a/tooling/backend/js_pt_hooks.cpp b/tooling/backend/js_pt_hooks.cpp index 833676b96c4078785ccac61b9e73989b6520394d..b7afbd0ece46c9b6ae306cb340363f016ca43c1b 100644 --- a/tooling/backend/js_pt_hooks.cpp +++ b/tooling/backend/js_pt_hooks.cpp @@ -18,12 +18,11 @@ #include "agent/debugger_impl.h" namespace panda::ecmascript::tooling { -void JSPtHooks::DebuggerStmt(const JSPtLocation &location) +void JSPtHooks::DebuggerStmt([[maybe_unused]] const JSPtLocation &location) { - LOG_DEBUGGER(INFO) << "JSPHooks: Debugger => " << location.GetMethodId() << ": " - << location.GetBytecodeOffset(); + LOG_DEBUGGER(VERBOSE) << "JSPHooks: Debugger Statement"; [[maybe_unused]] LocalScope scope(debugger_->vm_); - debugger_->NotifyPaused(location, OTHER); + debugger_->NotifyPaused({}, OTHER); } void JSPtHooks::Breakpoint(const JSPtLocation &location)