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

前端之家收集整理的这篇文章主要介绍了cocos2dx3.4 新建项目不能用vs BabeLua调试前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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"

这个是配置

猜你在找的Cocos2d-x相关文章