From cdd6fd5277708cff2a57e0014faf023a18a6f035 Mon Sep 17 00:00:00 2001 From: yang-19970325 Date: Sat, 24 Sep 2022 14:30:42 +0800 Subject: [PATCH] fix bug in bundle compiler mode Issue:#I5SWSK Signed-off-by: yang-19970325 Change-Id: I2bf099ce7256f7a3c3deb717cbc588d447597255 --- tooling/agent/debugger_impl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tooling/agent/debugger_impl.cpp b/tooling/agent/debugger_impl.cpp index 3d941e19..5aaaeeba 100644 --- a/tooling/agent/debugger_impl.cpp +++ b/tooling/agent/debugger_impl.cpp @@ -895,7 +895,8 @@ bool DebuggerImpl::GenerateCallFrame(CallFrame *callFrame, { Method *method = DebuggerApi::GetMethod(frameHandler); auto methodId = method->GetMethodId(); - DebugInfoExtractor *extractor = GetExtractor(method->GetJSPandaFile()); + const JSPandaFile *jsPandaFile = method->GetJSPandaFile(); + DebugInfoExtractor *extractor = GetExtractor(jsPandaFile); if (extractor == nullptr) { LOG_DEBUGGER(ERROR) << "GenerateCallFrame: extractor is null"; return false; @@ -935,7 +936,9 @@ bool DebuggerImpl::GenerateCallFrame(CallFrame *callFrame, std::vector> scopeChain; scopeChain.emplace_back(GetLocalScopeChain(frameHandler, &thisObj)); - scopeChain.emplace_back(GetModuleScopeChain()); + if (jsPandaFile != nullptr && !jsPandaFile->IsBundlePack()) { + scopeChain.emplace_back(GetModuleScopeChain()); + } scopeChain.emplace_back(GetGlobalScopeChain()); callFrame->SetCallFrameId(callFrameId) -- Gitee