Beispiel #1
0
 private void Proc_DebugHook(object sender, NLua.Event.DebugHookEventArgs e)
 {
     if (abort) // if abort is true
     {
         Lua lState = (Lua)sender;
         // Put error on Lua stack with MachineHalted error message
         lState.State.Error(MachineErrorMessages.MachineHalted);
     }
 }
Beispiel #2
0
 private void Lua_DebugHook(object sender, NLua.Event.DebugHookEventArgs e)
 {
     this.Dispatcher.Invoke(() =>
     {
         TextArea.MarkerDeleteAll(BOOKMARK_MARKER);
         var line = TextArea.Lines[e.LuaDebug.currentline - 1];
         Console.WriteLine(e.LuaDebug.currentline - 1);
         line.MarkerAdd(BOOKMARK_MARKER);
     });
 }
 void HandleDebugHook(object sender, NLua.Event.DebugHookEventArgs e)
 {
     Console.Out.WriteLine("LUA EXCEPTION:");
     Console.Out.Write(String.Format("FT {0} ", e.LuaDebug.eventCode.ToString()));
     Console.Out.WriteLine(e.LuaDebug.currentline);
     KeraLua.LuaDebug luaDebug = e.LuaDebug;
     if (luaDebug.source.Length > 0 && luaDebug.source[0] == '@')
     {
         Console.Out.WriteLine(String.Format("   n:{0} nw:{1} s:{2} ss:{3} ld:{4} lld:{5} cl:{6}",
                                             luaDebug.name, luaDebug.namewhat,
                                             luaDebug.source, luaDebug.shortsrc,
                                             luaDebug.linedefined, luaDebug.lastlinedefined, luaDebug.currentline));
     }
 }
 protected virtual void Debug(object sender, NLua.Event.DebugHookEventArgs e)
 {
 }
Beispiel #5
0
 private void Lua_DebugHook(object sender, NLua.Event.DebugHookEventArgs e)
 {
 }