本文整理汇总了C++中scriptDebugServer函数的典型用法代码示例。如果您正苦于以下问题:C++ scriptDebugServer函数的具体用法?C++ scriptDebugServer怎么用?C++ scriptDebugServer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了scriptDebugServer函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: scriptDebugServer
void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, const RefPtr<InspectorObject>& location)
{
if (!m_continueToLocationBreakpointId.isEmpty()) {
scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointId);
m_continueToLocationBreakpointId = "";
}
String scriptId;
int lineNumber;
int columnNumber;
if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNumber))
return;
ScriptBreakpoint breakpoint(lineNumber, columnNumber, "", false);
m_continueToLocationBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &lineNumber, &columnNumber);
resume(errorString);
}
开发者ID:kodybrown,项目名称:webkit,代码行数:18,代码来源:InspectorDebuggerAgent.cpp
示例2: scriptDebugServer
void InspectorDebuggerAgent::schedulePauseOnNextStatement(DebuggerFrontendDispatcher::Reason breakReason, RefPtr<InspectorObject>&& data)
{
if (m_javaScriptPauseScheduled)
return;
m_breakReason = breakReason;
m_breakAuxData = WTF::move(data);
scriptDebugServer().setPauseOnNextStatement(true);
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:9,代码来源:InspectorDebuggerAgent.cpp
示例3: if
void InspectorDebuggerAgent::setPauseOnExceptions(ErrorString& errorString, const String& stringPauseState)
{
JSC::Debugger::PauseOnExceptionsState pauseState;
if (stringPauseState == "none")
pauseState = JSC::Debugger::DontPauseOnExceptions;
else if (stringPauseState == "all")
pauseState = JSC::Debugger::PauseOnAllExceptions;
else if (stringPauseState == "uncaught")
pauseState = JSC::Debugger::PauseOnUncaughtExceptions;
else {
errorString = ASCIILiteral("Unknown pause on exceptions mode: ") + stringPauseState;
return;
}
scriptDebugServer().setPauseOnExceptionsState(static_cast<JSC::Debugger::PauseOnExceptionsState>(pauseState));
if (scriptDebugServer().pauseOnExceptionsState() != pauseState)
errorString = ASCIILiteral("Internal error. Could not change pause on exceptions state");
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:18,代码来源:InspectorDebuggerAgent.cpp
示例4: resolveCallFrame
void InspectorDebuggerAgent::stepOut(ErrorString* errorString, const String* callFrameId)
{
if (!assertPaused(errorString))
return;
ScriptValue frame = resolveCallFrame(errorString, callFrameId);
if (!errorString->isEmpty())
return;
m_injectedScriptManager->releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
scriptDebugServer().stepOutOfFunction(frame);
}
开发者ID:chunywang,项目名称:blink-crosswalk,代码行数:10,代码来源:InspectorDebuggerAgent.cpp
示例5: scriptDebugServer
void InspectorDebuggerAgent::removeBreakpoint(ErrorString*, const String& breakpointId)
{
m_javaScriptBreakpoints.remove(breakpointId);
BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId);
if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpointIds.end())
return;
for (size_t i = 0; i < debugServerBreakpointIdsIterator->value.size(); ++i)
scriptDebugServer().removeBreakpoint(debugServerBreakpointIdsIterator->value[i]);
m_breakpointIdToDebugServerBreakpointIds.remove(debugServerBreakpointIdsIterator);
}
开发者ID:jeremysjones,项目名称:webkit,代码行数:11,代码来源:InspectorDebuggerAgent.cpp
示例6: setScriptSource
void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptId, const String& newContent, const bool* const preview, RefPtr<Array<TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)
{
bool previewOnly = preview && *preview;
ScriptObject resultObject;
if (!scriptDebugServer().setScriptSource(scriptId, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
return;
newCallFrames = currentCallFrames();
RefPtr<InspectorObject> object = scriptToInspectorObject(resultObject);
if (object)
result = object;
}
开发者ID:kodybrown,项目名称:webkit,代码行数:11,代码来源:InspectorDebuggerAgent.cpp
示例7: scriptDebugServer
void InspectorDebuggerAgent::removeBreakpoint(const String& breakpointId)
{
BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId);
if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpointIds.end())
return;
for (size_t i = 0; i < debugServerBreakpointIdsIterator->value.size(); ++i) {
const String& debugServerBreakpointId = debugServerBreakpointIdsIterator->value[i];
scriptDebugServer().removeBreakpoint(debugServerBreakpointId);
m_serverBreakpoints.remove(debugServerBreakpointId);
}
m_breakpointIdToDebugServerBreakpointIds.remove(debugServerBreakpointIdsIterator);
}
开发者ID:chunywang,项目名称:blink-crosswalk,代码行数:12,代码来源:InspectorDebuggerAgent.cpp
示例8: m_globalObject
JSGlobalObjectInspectorController::JSGlobalObjectInspectorController(JSGlobalObject& globalObject)
: m_globalObject(globalObject)
, m_injectedScriptManager(std::make_unique<InjectedScriptManager>(*this, InjectedScriptHost::create()))
, m_inspectorFrontendChannel(nullptr)
, m_includeNativeCallStackWithExceptions(true)
{
auto runtimeAgent = std::make_unique<JSGlobalObjectRuntimeAgent>(m_injectedScriptManager.get(), m_globalObject);
auto consoleAgent = std::make_unique<JSGlobalObjectConsoleAgent>(m_injectedScriptManager.get());
auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(m_injectedScriptManager.get(), m_globalObject, consoleAgent.get());
auto profilerAgent = std::make_unique<JSGlobalObjectProfilerAgent>(m_globalObject);
m_consoleAgent = consoleAgent.get();
m_consoleClient = std::make_unique<JSConsoleClient>(m_consoleAgent, profilerAgent.get());
runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
profilerAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
m_agents.append(std::make_unique<InspectorAgent>());
m_agents.append(std::move(runtimeAgent));
m_agents.append(std::move(consoleAgent));
m_agents.append(std::move(debuggerAgent));
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:22,代码来源:JSGlobalObjectInspectorController.cpp
示例9: ASCIILiteral
void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString& errorString, const String& callFrameId, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, const bool* saveResult, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& result, Inspector::Protocol::OptOutput<bool>* wasThrown, Inspector::Protocol::OptOutput<int>* savedResultIndex)
{
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(callFrameId);
if (injectedScript.hasNoValue()) {
errorString = ASCIILiteral("Inspected frame has gone");
return;
}
JSC::Debugger::PauseOnExceptionsState previousPauseOnExceptionsState = scriptDebugServer().pauseOnExceptionsState();
if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
if (previousPauseOnExceptionsState != JSC::Debugger::DontPauseOnExceptions)
scriptDebugServer().setPauseOnExceptionsState(JSC::Debugger::DontPauseOnExceptions);
muteConsole();
}
injectedScript.evaluateOnCallFrame(errorString, m_currentCallStack, callFrameId, expression, objectGroup ? *objectGroup : "", includeCommandLineAPI ? *includeCommandLineAPI : false, returnByValue ? *returnByValue : false, generatePreview ? *generatePreview : false, saveResult ? *saveResult : false, &result, wasThrown, savedResultIndex);
if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
unmuteConsole();
if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState)
scriptDebugServer().setPauseOnExceptionsState(previousPauseOnExceptionsState);
}
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:23,代码来源:InspectorDebuggerAgent.cpp
示例10: m_workerGlobalScope
WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope& workerGlobalScope)
: m_workerGlobalScope(workerGlobalScope)
, m_instrumentingAgents(InstrumentingAgents::create(*this))
, m_injectedScriptManager(std::make_unique<WebInjectedScriptManager>(*this, WebInjectedScriptHost::create()))
, m_executionStopwatch(Stopwatch::create())
, m_frontendRouter(FrontendRouter::create())
, m_backendDispatcher(BackendDispatcher::create(m_frontendRouter.copyRef()))
{
AgentContext baseContext = {
*this,
*m_injectedScriptManager,
m_frontendRouter.get(),
m_backendDispatcher.get()
};
WebAgentContext webContext = {
baseContext,
m_instrumentingAgents.get()
};
WorkerAgentContext workerContext = {
webContext,
workerGlobalScope,
};
auto runtimeAgent = std::make_unique<WorkerRuntimeAgent>(workerContext);
m_runtimeAgent = runtimeAgent.get();
m_instrumentingAgents->setWorkerRuntimeAgent(m_runtimeAgent);
m_agents.append(WTF::move(runtimeAgent));
auto consoleAgent = std::make_unique<WorkerConsoleAgent>(workerContext);
m_instrumentingAgents->setWebConsoleAgent(consoleAgent.get());
auto debuggerAgent = std::make_unique<WorkerDebuggerAgent>(workerContext);
m_runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
m_agents.append(WTF::move(debuggerAgent));
m_agents.append(std::make_unique<InspectorTimelineAgent>(workerContext, nullptr, InspectorTimelineAgent::WorkerInspector));
m_agents.append(WTF::move(consoleAgent));
if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager->commandLineAPIHost()) {
commandLineAPIHost->init(nullptr
, nullptr
, nullptr
, nullptr
, nullptr
);
}
}
开发者ID:rhythmkay,项目名称:webkit,代码行数:49,代码来源:WorkerInspectorController.cpp
示例11: m_workerGlobalScope
WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope& workerGlobalScope)
: m_workerGlobalScope(workerGlobalScope)
, m_instrumentingAgents(InstrumentingAgents::create(*this))
, m_injectedScriptManager(std::make_unique<WebInjectedScriptManager>(*this, WebInjectedScriptHost::create()))
, m_runtimeAgent(nullptr)
{
auto runtimeAgent = std::make_unique<WorkerRuntimeAgent>(m_injectedScriptManager.get(), &workerGlobalScope);
m_runtimeAgent = runtimeAgent.get();
m_instrumentingAgents->setWorkerRuntimeAgent(m_runtimeAgent);
m_agents.append(std::move(runtimeAgent));
auto consoleAgent = std::make_unique<WorkerConsoleAgent>(m_injectedScriptManager.get());
m_instrumentingAgents->setWebConsoleAgent(consoleAgent.get());
auto debuggerAgent = std::make_unique<WorkerDebuggerAgent>(m_injectedScriptManager.get(), m_instrumentingAgents.get(), &workerGlobalScope);
m_runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
m_agents.append(std::move(debuggerAgent));
auto profilerAgent = std::make_unique<WorkerProfilerAgent>(m_instrumentingAgents.get(), &workerGlobalScope);
profilerAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
m_agents.append(std::move(profilerAgent));
m_agents.append(std::make_unique<InspectorTimelineAgent>(m_instrumentingAgents.get(), nullptr, InspectorTimelineAgent::WorkerInspector, nullptr));
m_agents.append(std::move(consoleAgent));
if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager->commandLineAPIHost()) {
commandLineAPIHost->init(nullptr
, nullptr
, nullptr
, nullptr
#if ENABLE(SQL_DATABASE)
, nullptr
#endif
);
}
}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:36,代码来源:WorkerInspectorController.cpp
示例12: injectedScriptForEval
void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, TypeBuilder::OptOutput<ScriptId>* scriptId, TypeBuilder::OptOutput<String>* syntaxErrorMessage)
{
InjectedScript injectedScript = injectedScriptForEval(errorString, 0);
if (injectedScript.hasNoValue()) {
*errorString = "Inspected frame has gone";
return;
}
String scriptIdValue;
String exceptionMessage;
scriptDebugServer().compileScript(injectedScript.scriptState(), expression, sourceURL, &scriptIdValue, &exceptionMessage);
if (!scriptIdValue && !exceptionMessage) {
*errorString = "Script compilation failed";
return;
}
*syntaxErrorMessage = exceptionMessage;
*scriptId = scriptIdValue;
}
开发者ID:kodybrown,项目名称:webkit,代码行数:18,代码来源:InspectorDebuggerAgent.cpp
示例13: ASSERT
void InspectorDebuggerAgent::didPause(ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints)
{
ASSERT(scriptState && !m_pausedScriptState);
m_pausedScriptState = scriptState;
m_currentCallStack = callFrames;
m_skipStepInCount = numberOfStepsBeforeStepOut;
if (!exception.hasNoValue()) {
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
if (!injectedScript.hasNoValue()) {
m_breakReason = InspectorFrontend::Debugger::Reason::Exception;
m_breakAuxData = injectedScript.wrapObject(exception, "backtrace")->openAccessors();
// m_breakAuxData might be null after this.
}
}
RefPtr<Array<String> > hitBreakpointIds = Array<String>::create();
for (Vector<String>::const_iterator i = hitBreakpoints.begin(); i != hitBreakpoints.end(); ++i) {
DebugServerBreakpointToBreakpointIdAndSourceMap::iterator breakpointIterator = m_serverBreakpoints.find(*i);
if (breakpointIterator != m_serverBreakpoints.end()) {
const String& localId = breakpointIterator->value.first;
hitBreakpointIds->addItem(localId);
BreakpointSource source = breakpointIterator->value.second;
if (m_breakReason == InspectorFrontend::Debugger::Reason::Other && source == DebugCommandBreakpointSource)
m_breakReason = InspectorFrontend::Debugger::Reason::DebugCommand;
}
}
m_frontend->paused(currentCallFrames(), m_breakReason, m_breakAuxData, hitBreakpointIds);
m_javaScriptPauseScheduled = false;
if (!m_continueToLocationBreakpointId.isEmpty()) {
scriptDebugServer().removeBreakpoint(m_continueToLocationBreakpointId);
m_continueToLocationBreakpointId = "";
}
if (m_listener)
m_listener->didPause();
}
开发者ID:chunywang,项目名称:blink-crosswalk,代码行数:41,代码来源:InspectorDebuggerAgent.cpp
示例14: m_globalObject
JSGlobalObjectInspectorController::JSGlobalObjectInspectorController(JSGlobalObject& globalObject)
: m_globalObject(globalObject)
, m_injectedScriptManager(std::make_unique<InjectedScriptManager>(*this, InjectedScriptHost::create()))
, m_executionStopwatch(Stopwatch::create())
, m_frontendRouter(FrontendRouter::create())
, m_backendDispatcher(BackendDispatcher::create(m_frontendRouter.copyRef()))
{
AgentContext baseContext = {
*this,
*m_injectedScriptManager,
m_frontendRouter.get(),
m_backendDispatcher.get()
};
JSAgentContext context = {
baseContext,
globalObject
};
auto inspectorAgent = std::make_unique<InspectorAgent>(context);
auto runtimeAgent = std::make_unique<JSGlobalObjectRuntimeAgent>(context);
auto consoleAgent = std::make_unique<JSGlobalObjectConsoleAgent>(context);
auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(context, consoleAgent.get());
auto heapAgent = std::make_unique<InspectorHeapAgent>(context);
m_inspectorAgent = inspectorAgent.get();
m_debuggerAgent = debuggerAgent.get();
m_heapAgent = heapAgent.get();
m_consoleAgent = consoleAgent.get();
m_consoleClient = std::make_unique<JSGlobalObjectConsoleClient>(m_consoleAgent);
runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
m_agents.append(WTF::move(inspectorAgent));
m_agents.append(WTF::move(runtimeAgent));
m_agents.append(WTF::move(consoleAgent));
m_agents.append(WTF::move(debuggerAgent));
m_agents.append(WTF::move(heapAgent));
m_executionStopwatch->start();
}
开发者ID:rhythmkay,项目名称:webkit,代码行数:41,代码来源:JSGlobalObjectInspectorController.cpp
注:本文中的scriptDebugServer函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论