Example #1
0
        private static Jint.Runtime.Debugger.StepMode EngineStepOrBreak(object sender, Jint.Runtime.Debugger.DebugInformation e, DebugSession session)
        {
            try
            {
                if (session.Exception != null)
                {
                    return(Jint.Runtime.Debugger.StepMode.None);
                }

                session.HandleStep(new DebugInfo
                {
                    CurrentLine = e.CurrentStatement.Location.Start.Line,
                    Variables   = GetVariables(session.JsEngine)
                });

                Task.Delay(new TimeSpan(0, 10, 0), session.CancellationTokenSource.Token).Wait();
                return(Jint.Runtime.Debugger.StepMode.None);
            }
            catch
            {
                return(session.StepMode);
            }
        }