cocos ide 調(diào)試lua 程序自動關閉問題處理

F:\PubGame\github\QiDian\BianFengJiaXing\OldYueJuPubModel\Classes\Runtime-Lua\runtime

                rapidjson::Document* filecfgjson = _fileserver->getFileCfgJson();
                for (auto it = filecfgjson->MemberonBegin(); it != filecfgjson->MemberonEnd(); ++it)
                {
                    //bodyvalue.AddMember(it->name.GetString(), it->value.GetString(), dReplyParse.GetAllocator());//注釋這一句bug cause lang and shutdownapp 當資源太多的時候ide通信超時直接發(fā)起shutdownapp命令,導致onStartDebuger沒有被調(diào)用,所以沒有啟動lua調(diào)試器
                }
                dReplyParse.AddMember("body", bodyvalue, dReplyParse.GetAllocator());
                dReplyParse.AddMember("code", 0, dReplyParse.GetAllocator());

正常的交互命令應該是這樣

onSendCommand是代碼中打印的log
Console: listening on  0.0.0.0 : 6010
Console: listening on  0.0.0.0 : 6020
iShow!
onSendCommand {"cmd":"getversion","type":"request","seq":42}
onSendCommand {"cmd":"getfileinfo","type":"request","seq":43}
onSendCommand {"debugcfg":"'127.0.0.1','10000','luaidekey',nil,'win','\/CocosLuaGame\/'","cmd":"start-logic","type":"request","seq":44}
onStartDebuger
startScript debug args = require('debugger')('127.0.0.1','10000','luaidekey',nil,'win','/CocosLuaGame/','')
debug args = require('debugger')('127.0.0.1','10000','luaidekey',nil,'win','/CocosLuaGame/','')


onSendCommand {"cmd":"getversion","type":"request","seq":42}
onSendCommand {"cmd":"getfileinfo","type":"request","seq":43} //這個地方超時的話會導致exe被關閉
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內(nèi)容