diff --git a/Source/Core/Runtime/Operations/Operation.cs b/Source/Core/Runtime/Operations/Operation.cs index 1fa0c950..6cf422ec 100644 --- a/Source/Core/Runtime/Operations/Operation.cs +++ b/Source/Core/Runtime/Operations/Operation.cs @@ -201,5 +201,18 @@ namespace Microsoft.Coyote.Runtime return false; } + + /// + /// Registers the method invoked by the currently executing operation. + /// + public static void RegisterCallSite(string method) + { + var runtime = CoyoteRuntime.Current; + if (runtime.SchedulingPolicy != SchedulingPolicy.None && + runtime.TryGetExecutingOperation(out ControlledOperation current)) + { + current.LastCallSite = method; + } + } } }