diff --git a/src/TLuaInterpreter.cpp b/src/TLuaInterpreter.cpp index 893a32d..172307f 100755 --- a/src/TLuaInterpreter.cpp +++ b/src/TLuaInterpreter.cpp @@ -4623,8 +4623,22 @@ int TLuaInterpreter::debug( lua_State *L ) QString luaDebugText=""; for (int i=0; i 1 ? " [" + QString::number(i) + "] " : " ") + lua_tostring( L, i+1 ); + luaDebugText += (nbargs > 1 ? " (" + QString::number(i+1) + ") " : " ") + lua_tostring( L, i+1 ); } + + QColor green = QColor(0,255,0); + QColor blue = QColor(0,0,255); + QColor black = QColor(0,0,0); + QString s1 = QString("[DEBUG:]"); + QString s2 = QString("%1\n").arg(luaDebugText); + + Host * mpHost = TLuaInterpreter::luaInterpreterMap[L]; + if( mpHost->mpEditorDialog ) + { + mpHost->mpEditorDialog->mpErrorConsole->printDebug(blue, black, s1); + mpHost->mpEditorDialog->mpErrorConsole->printDebug(green, black, s2); + } + return 0; }