public void EnterSingleStepModeSafely(HaltArguments args)
{
// this method should only be called from CPU thread,
// but we should check it anyway
CheckCpuThreadId();
TlibSetPaused();
InvokeInCpuThreadSafely(() =>
{
ExecutionMode = ExecutionMode.SingleStep;
TlibClearPaused();
if(args != null)
{
InvokeHalted(args);
}
});
}