Example #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="luaDebug">Lua debug structure.</param>
 /// <param name="fileName">Filename</param>
 /// <param name="line">Line number</param>
 /// <param name="action">Action</param>
 /// <param name="breakpoint">Brewakpoint</param>
 public StopingEventArgs(LuaDebug luaDebug, string fileName, int line, DebuggerActions action, LuaDebugBreakpoint breakpoint)
 {
     LuaDebug   = luaDebug;
     FileName   = fileName;
     Line       = line;
     Action     = action;
     Breakpoint = breakpoint;
 }
Example #2
0
 /// <summary>
 /// Steps into the function if possible.
 /// </summary>
 public void StepInto()
 {
     if (m_State == LuaDebuggerState.Stoped)
     {
         m_Action = DebuggerActions.StepInto;
         m_State  = LuaDebuggerState.Running;
     }
 }
Example #3
0
 /// <summary>
 /// Continues execution until the next breakpoint.
 /// </summary>
 public void Run()
 {
     if (m_State == LuaDebuggerState.Stoped)
     {
         m_Action = DebuggerActions.Run;
         m_State  = LuaDebuggerState.Running;
     }
 }
Example #4
0
 /// <summary>
 /// Steps out of the current function.
 /// </summary>
 public void StepOut()
 {
     if (m_State == LuaDebuggerState.Stoped)
     {
         m_Action         = DebuggerActions.StepOut;
         m_StepStackLevel = m_StackLevel - 1;
         m_State          = LuaDebuggerState.Running;
     }
 }
Example #5
0
 /// <summary>
 /// Stops execution.
 /// </summary>
 /// <param name="luaDebug">LuaDebug from debug hook.</param>
 /// <param name="action">Current Debugger Action.</param>
 /// <param name="breakpoint">Brekpoint. Can be null.</param>
 /// <remarks>
 /// The WaitingForAction event is called as long as State == Stoped.
 /// </remarks>
 private void StopExecution(LuaDebug luaDebug, DebuggerActions action, LuaDebugBreakpoint breakpoint)
 {
     m_State = LuaDebuggerState.Stoped;
     try
     {
         OnStopping(new StopingEventArgs(
                        luaDebug, luaDebug.shortsrc,
                        luaDebug.eventCode == EventCodes.LUA_HOOKCALL ? luaDebug.linedefined : luaDebug.currentline,
                        action,
                        breakpoint));
         do
         {
             OnWaitingForAction(new EventArgs());
         }while (m_State == LuaDebuggerState.Stoped);
     }
     finally
     {
         m_State = LuaDebuggerState.Running;
     }
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="luaDebug">Lua debug structure.</param>
 /// <param name="fileName">Filename</param>
 /// <param name="line">Line number</param>
 /// <param name="action">Action</param>
 /// <param name="breakpoint">Brewakpoint</param>
 public StopingEventArgs(LuaDebug luaDebug, string fileName, int line, DebuggerActions action, LuaDebugBreakpoint breakpoint)
 {
     LuaDebug = luaDebug;
      FileName = fileName;
      Line = line;
      Action = action;
      Breakpoint = breakpoint;
 }
 /// <summary>
 /// Stops execution.
 /// </summary>
 /// <param name="luaDebug">LuaDebug from debug hook.</param>
 /// <param name="action">Current Debugger Action.</param>
 /// <param name="breakpoint">Brekpoint. Can be null.</param>
 /// <remarks>
 /// The WaitingForAction event is called as long as State == Stoped.
 /// </remarks>
 private void StopExecution(LuaDebug luaDebug, DebuggerActions action, LuaDebugBreakpoint breakpoint)
 {
     m_State = LuaDebuggerState.Stoped;
      try
      {
     OnStopping(new StopingEventArgs(
        luaDebug, luaDebug.shortsrc,
        luaDebug.eventCode == EventCodes.LUA_HOOKCALL ? luaDebug.linedefined : luaDebug.currentline,
        action,
        breakpoint));
     do
     {
        OnWaitingForAction(new EventArgs());
     }
     while (m_State == LuaDebuggerState.Stoped);
      }
      finally
      {
     m_State = LuaDebuggerState.Running;
      }
 }
 /// <summary>
 /// Stops execution on the next executed line of code.
 /// </summary>
 public void Stop()
 {
     m_Action = DebuggerActions.Stop;
 }
 /// <summary>
 /// Executes the next line of code.
 /// </summary>
 public void StepOver()
 {
     if (m_State == LuaDebuggerState.Stoped)
      {
     m_Action = DebuggerActions.StepOver;
     m_StepStackLevel = m_StackLevel;
     m_State = LuaDebuggerState.Running;
      }
 }
 /// <summary>
 /// Steps into the function if possible.
 /// </summary>
 public void StepInto()
 {
     if (m_State == LuaDebuggerState.Stoped)
      {
     m_Action = DebuggerActions.StepInto;
     m_State = LuaDebuggerState.Running;
      }
 }
 /// <summary>
 /// Continues execution until the next breakpoint.
 /// </summary>
 public void Run()
 {
     if (m_State == LuaDebuggerState.Stoped)
      {
     m_Action = DebuggerActions.Run;
     m_State = LuaDebuggerState.Running;
      }
 }
Example #12
0
 /// <summary>
 /// Stops execution on the next executed line of code.
 /// </summary>
 public void Stop()
 {
     m_Action = DebuggerActions.Stop;
 }