cocos2dx3.4 新建项目不能用vs BabeLua调试

cocos2dx3.4 新建项目不能用vs BabeLua调试,第1张

概述cocos2dx 3.4新建lua项目,按照 http://www.cocoachina.com/bbs/read.php?tid-205043-page-1.html 的 *** 作,没有办法进入断点.项目可以正常运行,但是把Lua插件生成的temp项目设置成启动项目时,模拟器运行就是黑屏, 这个是日志: --------------------------------- Setting Info -- cocos2dx 3.4新建lua项目,按照 http://www.cocoachina.com/bbs/read.php?tid-205043-page-1.html 的 *** 作,没有办法进入断点.项目可以正常运行,但是把Lua插件生成的temp项目设置成启动项目时,模拟器运行就是黑屏,

这个是日志:
--------------------------------- Setting Info -----------------------------------------
Setting name: test_lua3.4_script
Lua scripts folder: E:\test_lua3.4\src
Lua exe path: E:\test_lua3.4\runtime\win32\test_lua3.4.exe
Working path: E:\test_lua3.4\runtime\win32
Command line:
----------------------------------------------------------------------------------------
E:\test_lua3.4\runtime\win32\test_lua3.4.exe
DeBUGger attached to process
0x037501c0: VM created
package.path: .\?.lua;E:\test_lua3.4\runtime\win32\lua\?.lua;E:\test_lua3.4\runtime\win32\lua\?\init.lua;
Load script(0): E:\test_lua3.4\src\@UnTitled1.luarelative(file not exist)
Load script(1): E:\test_lua3.4\src\@UnTitled2.luarelative(file not exist)
Load script(2): E:\test_lua3.4\src\@UnTitled3.luarelative(file not exist)
Load script(3): E:\test_lua3.4\src\@UnTitled4.luarelative(file not exist)
Load script(4): E:\test_lua3.4\src\@UnTitled5.luarelative(file not exist)
Load script(5): E:\test_lua3.4\src\@UnTitled6.luarelative(file not exist)
Load script(6): E:\test_lua3.4\src\@UnTitled7.luarelative(file not exist)
Load script(7): E:\test_lua3.4\src\@UnTitled8.luarelative(file not exist)
Load script(8): E:\test_lua3.4\src\@UnTitled9.luarelative(file not exist)
Load script(9): E:\test_lua3.4\src\@UnTitled10.luarelative(file not exist)
我折腾了2天,还是没有 成功,希望能帮助下,刚开始用 vs.
最开始用VS新建3.4 lua项目时,直接黑屏,不能直接运行,每次都要刷新才行.后来在AppDelegate.cpp的bool AppDelegate::applicationDIDFinishLaunching()下开始的位置添加:
//add search paths/////////////////////////////
string strPath = CCfileUtils::getInstance()->getWritablePath();
vector<string> vtPath = CCfileUtils::getInstance()->getSearchPaths();
vtPath.push_back(strPath + "res/");
vtPath.push_back(strPath + "src/");
CCfileUtils::getInstance()->setSearchPaths(vtPath);

在src目录下的main.lua文件中加入

package.path = package.path..";src/?.lua"

这个是配置
总结

以上是内存溢出为你收集整理的cocos2dx3.4 新建项目不能用vs BabeLua调试全部内容,希望文章能够帮你解决cocos2dx3.4 新建项目不能用vs BabeLua调试所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1083000.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-27
下一篇2022-05-27

发表评论

登录后才能评论

评论列表(0条)

    保存