本文整理汇总了C++中ThreadContext::IsRuntimeInTTDMode方法的典型用法代码示例。如果您正苦于以下问题:C++ ThreadContext::IsRuntimeInTTDMode方法的具体用法?C++ ThreadContext::IsRuntimeInTTDMode怎么用?C++ ThreadContext::IsRuntimeInTTDMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThreadContext
的用法示例。
在下文中一共展示了ThreadContext::IsRuntimeInTTDMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JsDiagSetStepType
CHAKRA_API JsDiagSetStepType(
_In_ JsDiagStepType stepType)
{
#ifndef ENABLE_SCRIPT_DEBUGGING
return JsErrorCategoryUsage;
#else
return ContextAPIWrapper_NoRecord<true>([&](Js::ScriptContext * scriptContext) -> JsErrorCode {
JsrtContext *currentContext = JsrtContext::GetCurrent();
JsrtRuntime* runtime = currentContext->GetRuntime();
VALIDATE_RUNTIME_IS_AT_BREAK(runtime);
JsrtDebugManager* jsrtDebugManager = runtime->GetJsrtDebugManager();
VALIDATE_IS_DEBUGGING(jsrtDebugManager);
if (stepType == JsDiagStepTypeStepIn)
{
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_STEP_INTO);
}
else if (stepType == JsDiagStepTypeStepOut)
{
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_STEP_OUT);
}
else if (stepType == JsDiagStepTypeStepOver)
{
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_STEP_OVER);
}
else if (stepType == JsDiagStepTypeStepBack)
{
#if ENABLE_TTD
ThreadContext* threadContext = runtime->GetThreadContext();
if(!threadContext->IsRuntimeInTTDMode())
{
//Don't want to fail hard when user accidentally clicks this so pring message and step forward
fprintf(stderr, "Must be in replay mode to use reverse-step - launch with \"--replay-debug\" flag in Node.");
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_STEP_OVER);
}
else
{
threadContext->TTDExecutionInfo->SetPendingTTDStepBackMove();
//don't worry about BP suppression because we are just going to throw after we return
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_CONTINUE);
}
#else
return JsErrorInvalidArgument;
#endif
}
else if (stepType == JsDiagStepTypeReverseContinue)
{
#if ENABLE_TTD
ThreadContext* threadContext = runtime->GetThreadContext();
if(!threadContext->IsRuntimeInTTDMode())
{
//Don't want to fail hard when user accidentally clicks this so pring message and step forward
fprintf(stderr, "Must be in replay mode to use reverse-continue - launch with \"--replay-debug\" flag in Node.");
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_CONTINUE);
}
else
{
threadContext->TTDExecutionInfo->SetPendingTTDReverseContinueMove(JsTTDMoveMode::JsTTDMoveScanIntervalForContinue);
//don't worry about BP suppression because we are just going to throw after we return
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_CONTINUE);
}
#else
return JsErrorInvalidArgument;
#endif
}
else if (stepType == JsDiagStepTypeContinue)
{
jsrtDebugManager->SetResumeType(BREAKRESUMEACTION_CONTINUE);
}
return JsNoError;
});
#endif
}