• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/runtime.php
  • Класс: BitrixBizprocAutomationEngineRuntime
  • Вызов: Runtime::isDebug
protected function isDebug(bool $isOnDocumentAdd = false): bool
{
	$debugSession = BizprocDebuggerSessionManager::getActiveSession();
	if (!$debugSession)
	{
		return false;
	}

	$documentType = $this->getTarget()->getDocumentType();
	if (!$debugSession->isStartedInDocumentType($documentType))
	{
		return false;
	}

	$documentId = $this->getTarget()->getComplexDocumentId();
	if (!$isOnDocumentAdd || $debugSession->isExperimentalMode() || $debugSession->isFixed())
	{
		return $debugSession->isSessionDocument($documentId);
	}

	$documentCategoryId = $this->getTarget()->getDocumentCategory();

	return $documentCategoryId === $debugSession->getDocumentCategoryId();
}