diff --git a/tooling/agent/debugger_impl.cpp b/tooling/agent/debugger_impl.cpp index 1b201f98839764239353c941259fd5da54367a46..d2b52151660da84ebf27f1d58d26d746fbde57ea 100755 --- a/tooling/agent/debugger_impl.cpp +++ b/tooling/agent/debugger_impl.cpp @@ -1464,8 +1464,9 @@ DispatchResponse DebuggerImpl::SetBreakpointByUrl(const SetBreakpointByUrlParams } return DebuggerApi::SetBreakpoint(jsDebugger_, location, condFuncRef, isSmartBreakpoint); }; + std::string methodName = params.HasMethodName() ? params.GetMethodName() : ""; if (!extractor->MatchWithLocation(callbackFunc, lineNumber, columnNumber, url, GetRecordName(url), - isSmartBreakpoint, params.GetMethodName())) { + isSmartBreakpoint, methodName)) { LOG_DEBUGGER(ERROR) << "failed to set breakpoint location number: " << lineNumber << ":" << columnNumber; return DispatchResponse::Fail("Breakpoint not found.");